@chevre/domain 28.0.0-alpha.4 → 28.0.0-alpha.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chevre/emailMessageBuilder.d.ts +9 -5
- package/lib/chevre/emailMessageBuilder.js +12 -11
- package/lib/chevre/factory/event.d.ts +1 -1
- package/lib/chevre/factory/event.js +1 -5
- package/lib/chevre/repo/acceptedOffer.d.ts +6 -5
- package/lib/chevre/repo/acceptedOffer.js +14 -9
- package/lib/chevre/repo/acceptedOfferInReserve.d.ts +6 -8
- package/lib/chevre/repo/acceptedOfferInReserve.js +13 -7
- package/lib/chevre/repo/adminAcceptedOffer.d.ts +25 -12
- package/lib/chevre/repo/adminAcceptedOffer.js +20 -10
- package/lib/chevre/repo/adminAccountTitle.d.ts +49 -0
- package/lib/chevre/repo/adminAccountTitle.js +212 -0
- package/lib/chevre/repo/adminAccountTitleCategory.d.ts +37 -0
- package/lib/chevre/repo/adminAccountTitleCategory.js +127 -0
- package/lib/chevre/repo/adminAccountTitleSet.d.ts +42 -0
- package/lib/chevre/repo/adminAccountTitleSet.js +149 -0
- package/lib/chevre/repo/adminEvent.d.ts +1 -7
- package/lib/chevre/repo/adminEvent.js +3 -9
- package/lib/chevre/repo/adminEventSeries.d.ts +67 -0
- package/lib/chevre/repo/adminEventSeries.js +178 -0
- package/lib/chevre/repo/{paymentServiceChannel.d.ts → adminPaymentServiceChannel.d.ts} +13 -11
- package/lib/chevre/repo/{paymentServiceChannel.js → adminPaymentServiceChannel.js} +20 -19
- package/lib/chevre/repo/adminTask.d.ts +2 -2
- package/lib/chevre/repo/adminTransaction.d.ts +20 -30
- package/lib/chevre/repo/aggregateEvent.js +0 -1
- package/lib/chevre/repo/categoryCode.js +0 -21
- package/lib/chevre/repo/event.d.ts +2 -2
- package/lib/chevre/repo/event.js +71 -110
- package/lib/chevre/repo/eventSeries.d.ts +5 -84
- package/lib/chevre/repo/eventSeries.js +21 -212
- package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.d.ts +1 -1
- package/lib/chevre/repo/issuer.d.ts +2 -6
- package/lib/chevre/repo/memberProgram.d.ts +1 -38
- package/lib/chevre/repo/memberProgram.js +1 -62
- package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/accountTitle.js +21 -25
- package/lib/chevre/repo/mongoose/schemas/civicStructure.d.ts +1 -0
- package/lib/chevre/repo/mongoose/schemas/event.js +0 -13
- package/lib/chevre/repo/mongoose/schemas/eventSeries.js +1 -18
- package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +1 -3
- package/lib/chevre/repo/mongoose/schemas/issuer.js +0 -10
- package/lib/chevre/repo/mongoose/schemas/message.d.ts +5 -1
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +0 -1
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +3 -12
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +1 -2
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.js +6 -15
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +22 -1
- package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/place.js +0 -9
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +1 -2
- package/lib/chevre/repo/mongoose/schemas/project.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/seller.d.ts +3 -1
- package/lib/chevre/repo/mongoose/schemas/seller.js +0 -2
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/transaction.js +51 -52
- package/lib/chevre/repo/offerCatalog.d.ts +0 -2
- package/lib/chevre/repo/offerCatalogItem.d.ts +13 -20
- package/lib/chevre/repo/offerCatalogItem.js +8 -86
- package/lib/chevre/repo/order.d.ts +2 -2
- package/lib/chevre/repo/order.js +0 -31
- package/lib/chevre/repo/orderInTransaction.d.ts +5 -25
- package/lib/chevre/repo/place/movieTheater.d.ts +3 -1
- package/lib/chevre/repo/place/movieTheater.js +3 -1
- package/lib/chevre/repo/place/{hasPOS.d.ts → pos.d.ts} +13 -20
- package/lib/chevre/repo/place/{hasPOS.js → pos.js} +66 -29
- package/lib/chevre/repo/place/screeningRoom.d.ts +24 -3
- package/lib/chevre/repo/place/screeningRoom.js +28 -17
- package/lib/chevre/repo/priceSpecification.d.ts +8 -8
- package/lib/chevre/repo/project.d.ts +13 -19
- package/lib/chevre/repo/project.js +27 -43
- package/lib/chevre/repo/projectMakesOffer.js +2 -2
- package/lib/chevre/repo/role.d.ts +1 -1
- package/lib/chevre/repo/role.js +1 -30
- package/lib/chevre/repo/seller.d.ts +11 -4
- package/lib/chevre/repo/seller.js +31 -58
- package/lib/chevre/repo/sellerPaymentAccepted.d.ts +14 -21
- package/lib/chevre/repo/sellerPaymentAccepted.js +65 -38
- package/lib/chevre/repo/task.d.ts +3 -3
- package/lib/chevre/repo/transaction/placeOrder.d.ts +2 -3
- package/lib/chevre/repo/transaction/placeOrder.js +15 -36
- package/lib/chevre/repository.d.ts +30 -15
- package/lib/chevre/repository.js +63 -30
- package/lib/chevre/service/aggregation/event/aggregateOffers.js +1 -2
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +2 -2
- package/lib/chevre/service/aggregation.d.ts +0 -2
- package/lib/chevre/service/aggregation.js +1 -3
- package/lib/chevre/service/assetTransaction/pay/start/preStart/validateAcceptedPaymentMethodIfNeeded.js +1 -2
- package/lib/chevre/service/assetTransaction/pay/start/preStart/validateSeller.js +2 -2
- package/lib/chevre/service/assetTransaction/reserve/start.js +2 -1
- package/lib/chevre/service/delivery/reservation/factory.d.ts +1 -1
- package/lib/chevre/service/event/saveScreeningEventSeries.d.ts +2 -2
- package/lib/chevre/service/event/saveScreeningEventSeries.js +2 -3
- package/lib/chevre/service/event/saveScreeningEvents.d.ts +2 -0
- package/lib/chevre/service/event/saveScreeningEvents.js +4 -4
- package/lib/chevre/service/event.d.ts +2 -0
- package/lib/chevre/service/event.js +0 -1
- package/lib/chevre/service/notification/sendEmailMessage.d.ts +2 -0
- package/lib/chevre/service/notification/sendEmailMessage.js +23 -6
- package/lib/chevre/service/offer/any.d.ts +1 -1
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -3
- package/lib/chevre/service/offer/event/authorize/factory.js +1 -8
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
- package/lib/chevre/service/offer/event/issueEventOfferTicket.js +0 -11
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +4 -10
- package/lib/chevre/service/offer/event/searchOfferAppliesToMovieTicket.js +2 -8
- package/lib/chevre/service/offer/event/searchOfferCatalogItems.js +2 -2
- package/lib/chevre/service/offer/event/searchOffersByIds.js +3 -9
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +0 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +0 -7
- package/lib/chevre/service/offer/onEventChanged.js +9 -21
- package/lib/chevre/service/offer.js +1 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +4 -6
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.js +23 -4
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder/factory/orderedItem.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
- package/lib/chevre/service/order/sendOrder.js +2 -14
- package/lib/chevre/service/payment/creditCard/getGMOInfoFromSeller.js +1 -1
- package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.d.ts +3 -3
- package/lib/chevre/service/payment/movieTicket/checkMovieTicket.js +1 -1
- package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.js +1 -1
- package/lib/chevre/service/payment/movieTicket/validation.js +1 -1
- package/lib/chevre/service/project.d.ts +3 -3
- package/lib/chevre/service/project.js +1 -1
- package/lib/chevre/service/task/importEventsFromCOA.js +2 -0
- package/lib/chevre/service/task/onResourceDeleted.js +8 -8
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.d.ts +7 -3
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +51 -50
- package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.js +1 -1
- package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.js +1 -1
- package/lib/chevre/service/task/onResourceUpdated.js +10 -47
- package/lib/chevre/service/task/sendEmailMessage.js +3 -1
- package/lib/chevre/service/task/syncResourcesFromCOA.js +5 -3
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.d.ts +6 -3
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +2 -15
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +6 -4
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +3 -7
- package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateInvoiceReferencesOrder.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/validateMovieTicket.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +2 -2
- package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +0 -2
- package/lib/chevre/service/transaction/placeOrder/confirm.js +6 -11
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.d.ts +6 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +8 -9
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.d.ts +6 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +2 -7
- package/lib/chevre/service/transaction/returnOrder/potentialActions.d.ts +6 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions.js +4 -3
- package/lib/chevre/service/transaction/returnOrder/preStart/factory.d.ts +1 -1
- package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -2
- package/lib/chevre/service/transaction/returnOrder.d.ts +0 -2
- package/lib/chevre/service/transaction/returnOrder.js +6 -6
- package/package.json +2 -2
- package/lib/chevre/repo/accountTitle.d.ts +0 -28
- package/lib/chevre/repo/accountTitle.js +0 -30
- package/lib/chevre/service/aggregation/project.d.ts +0 -17
- package/lib/chevre/service/aggregation/project.js +0 -98
- package/lib/chevre/service/delivery/factory.d.ts +0 -16
- package/lib/chevre/service/delivery/factory.js +0 -124
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.POSRepo = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const factory_1 = require("../../factory");
|
|
6
6
|
const settings_1 = require("../../settings");
|
|
@@ -8,21 +8,15 @@ const civicStructure_1 = require("../mongoose/schemas/civicStructure");
|
|
|
8
8
|
/**
|
|
9
9
|
* 施設のPOSリポジトリ
|
|
10
10
|
*/
|
|
11
|
-
class
|
|
11
|
+
class POSRepo {
|
|
12
12
|
operator;
|
|
13
13
|
civicStructureModel;
|
|
14
14
|
constructor(connection, operater) {
|
|
15
15
|
this.civicStructureModel = connection.model(civicStructure_1.modelName, (0, civicStructure_1.createSchema)());
|
|
16
16
|
this.operator = operater;
|
|
17
17
|
}
|
|
18
|
-
async
|
|
19
|
-
const matchStages = [
|
|
20
|
-
{ $match: { _id: { $eq: new mongoose_1.Types.ObjectId(this.operator.id) } } }
|
|
21
|
-
];
|
|
22
|
-
const projectIdEq = params.project?.id?.$eq;
|
|
23
|
-
if (typeof projectIdEq === 'string') {
|
|
24
|
-
matchStages.push({ $match: { 'project.id': { $eq: projectIdEq } } });
|
|
25
|
-
}
|
|
18
|
+
async findPOS(params) {
|
|
19
|
+
const matchStages = [];
|
|
26
20
|
const branchCodeEq = params.branchCode?.$eq;
|
|
27
21
|
if (typeof branchCodeEq === 'string') {
|
|
28
22
|
matchStages.push({ $match: { 'hasPOS.branchCode': { $eq: branchCodeEq } } });
|
|
@@ -32,6 +26,13 @@ class HasPOSRepo {
|
|
|
32
26
|
matchStages.push({ $match: { 'hasPOS.branchCode': { $regex: new RegExp(branchCodeRegex) } } });
|
|
33
27
|
}
|
|
34
28
|
const aggregate = this.civicStructureModel.aggregate([
|
|
29
|
+
// まず施設ドキュメントで絞る
|
|
30
|
+
{
|
|
31
|
+
$match: {
|
|
32
|
+
_id: { $eq: new mongoose_1.Types.ObjectId(this.operator.id) },
|
|
33
|
+
'project.id': { $eq: params.projectId }
|
|
34
|
+
}
|
|
35
|
+
},
|
|
35
36
|
{
|
|
36
37
|
$unwind: {
|
|
37
38
|
path: '$hasPOS'
|
|
@@ -42,54 +43,90 @@ class HasPOSRepo {
|
|
|
42
43
|
{
|
|
43
44
|
$project: {
|
|
44
45
|
_id: 0,
|
|
45
|
-
id: '$hasPOS.branchCode',
|
|
46
46
|
branchCode: '$hasPOS.branchCode',
|
|
47
|
-
name: '$hasPOS.name'
|
|
47
|
+
name: '$hasPOS.name',
|
|
48
|
+
// ...((!excludePOSId) && { id: '$hasPOS.branchCode' }) // discontinue(2026-09-22~)
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
]);
|
|
51
52
|
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
52
53
|
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
53
|
-
aggregate.
|
|
54
|
-
.
|
|
54
|
+
aggregate.skip(params.limit * (page - 1))
|
|
55
|
+
.limit(params.limit);
|
|
55
56
|
}
|
|
56
57
|
return aggregate.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
57
58
|
.exec();
|
|
58
59
|
}
|
|
59
|
-
async
|
|
60
|
+
async countPOS() {
|
|
61
|
+
const posCount = (await this.civicStructureModel.aggregate([
|
|
62
|
+
{
|
|
63
|
+
$match: {
|
|
64
|
+
_id: { $eq: new mongoose_1.Types.ObjectId(this.operator.id) },
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
$project: {
|
|
69
|
+
posCount: {
|
|
70
|
+
$cond: {
|
|
71
|
+
if: { $isArray: '$hasPOS' },
|
|
72
|
+
then: { $size: '$hasPOS' },
|
|
73
|
+
else: 0
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]).option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
79
|
+
.exec()).at(0)?.posCount;
|
|
80
|
+
if (typeof posCount !== 'number') {
|
|
81
|
+
throw new factory_1.factory.errors.NotFound(factory_1.factory.placeType.MovieTheater);
|
|
82
|
+
}
|
|
83
|
+
return { posCount };
|
|
84
|
+
}
|
|
85
|
+
async addPOSByBranchCode(params, options) {
|
|
60
86
|
// 施設存在確認
|
|
61
|
-
|
|
87
|
+
const movieTheaterDoc = await this.civicStructureModel.findOne({
|
|
62
88
|
'project.id': { $eq: params.project.id },
|
|
63
89
|
_id: { $eq: this.operator.id }
|
|
64
|
-
}, { _id: 1
|
|
90
|
+
}, { _id: 1 })
|
|
91
|
+
.lean()
|
|
65
92
|
.exec();
|
|
66
|
-
if (
|
|
93
|
+
if (movieTheaterDoc === null) {
|
|
67
94
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.placeType.MovieTheater);
|
|
68
95
|
}
|
|
96
|
+
// 最大数検証(2026-09-20~)
|
|
97
|
+
const { maxNumPOS } = options;
|
|
69
98
|
const creatingPOS = {
|
|
70
|
-
// 互換性維持対応としてidを保管
|
|
71
|
-
id: params.branchCode, //
|
|
99
|
+
// // 互換性維持対応としてidを保管
|
|
100
|
+
// id: params.branchCode as any, // discontinue(2026-09-22~)
|
|
72
101
|
branchCode: params.branchCode,
|
|
73
102
|
name: params.name
|
|
74
103
|
};
|
|
75
|
-
doc = await this.civicStructureModel.findOneAndUpdate({
|
|
104
|
+
const doc = await this.civicStructureModel.findOneAndUpdate({
|
|
76
105
|
'project.id': { $eq: params.project.id },
|
|
77
106
|
_id: { $eq: this.operator.id },
|
|
78
|
-
'hasPOS.branchCode': { $ne: params.branchCode }
|
|
107
|
+
'hasPOS.branchCode': { $ne: params.branchCode },
|
|
108
|
+
// 配列の長さが上限未満であることをアトミックに確認
|
|
109
|
+
$expr: {
|
|
110
|
+
$lt: [{ $size: { $ifNull: ['$hasPOS', []] } }, maxNumPOS] // 最大数担保(2026-09-20~)
|
|
111
|
+
}
|
|
79
112
|
}, {
|
|
80
113
|
$push: { hasPOS: creatingPOS }
|
|
81
114
|
}, {
|
|
82
|
-
new: true,
|
|
83
115
|
projection: { _id: 1 }
|
|
84
116
|
})
|
|
117
|
+
.lean()
|
|
85
118
|
.exec();
|
|
86
119
|
// 存在しなければID重複
|
|
87
120
|
if (doc === null) {
|
|
121
|
+
const { posCount } = await this.countPOS();
|
|
122
|
+
if (posCount >= maxNumPOS) {
|
|
123
|
+
throw new factory_1.factory.errors.Argument('operator.id', 'maxNumPOS exceeded');
|
|
124
|
+
}
|
|
125
|
+
// 上限以下で追加できない場合は「すでに登録済み」
|
|
88
126
|
throw new factory_1.factory.errors.AlreadyInUse('hasPOS', ['id']);
|
|
89
127
|
}
|
|
90
|
-
return doc.toObject({ virtuals: true });
|
|
91
128
|
}
|
|
92
|
-
async
|
|
129
|
+
async updatePOSByBranchCode(params) {
|
|
93
130
|
const doc = await this.civicStructureModel.findOneAndUpdate({
|
|
94
131
|
'project.id': { $eq: params.project.id },
|
|
95
132
|
_id: { $eq: this.operator.id },
|
|
@@ -107,13 +144,13 @@ class HasPOSRepo {
|
|
|
107
144
|
],
|
|
108
145
|
projection: { _id: 1 }
|
|
109
146
|
})
|
|
147
|
+
.lean()
|
|
110
148
|
.exec();
|
|
111
149
|
if (doc === null) {
|
|
112
150
|
throw new factory_1.factory.errors.NotFound('hasPOS');
|
|
113
151
|
}
|
|
114
|
-
return doc.toObject({ virtuals: true });
|
|
115
152
|
}
|
|
116
|
-
async
|
|
153
|
+
async deletePOSByBranchCode(params) {
|
|
117
154
|
const doc = await this.civicStructureModel.findOneAndUpdate({
|
|
118
155
|
'project.id': { $eq: params.project.id },
|
|
119
156
|
_id: { $eq: this.operator.id },
|
|
@@ -123,11 +160,11 @@ class HasPOSRepo {
|
|
|
123
160
|
}, {
|
|
124
161
|
projection: { _id: 1 }
|
|
125
162
|
})
|
|
163
|
+
.lean()
|
|
126
164
|
.exec();
|
|
127
165
|
if (doc === null) {
|
|
128
166
|
throw new factory_1.factory.errors.NotFound('hasPOS');
|
|
129
167
|
}
|
|
130
|
-
return doc.toObject({ virtuals: true });
|
|
131
168
|
}
|
|
132
169
|
}
|
|
133
|
-
exports.
|
|
170
|
+
exports.POSRepo = POSRepo;
|
|
@@ -84,7 +84,28 @@ export declare class ScreeningRoomRepo {
|
|
|
84
84
|
id: string;
|
|
85
85
|
};
|
|
86
86
|
}): Promise<mongo.DeleteResult>;
|
|
87
|
-
|
|
87
|
+
/**
|
|
88
|
+
* ルーム検索
|
|
89
|
+
* sectionCount,seatCountのprojectが可能
|
|
90
|
+
* sortはbranchCode: factory.sortType.Ascendingで固定
|
|
91
|
+
*/
|
|
92
|
+
projectRoomFields(params: Pick<factory.place.screeningRoom.ISearchConditions, '$projection' | 'branchCode' | 'containedInPlace' | 'parentOrganization'> & {
|
|
93
|
+
/**
|
|
94
|
+
* プロジェクト指定は必須
|
|
95
|
+
*/
|
|
96
|
+
project: {
|
|
97
|
+
id: {
|
|
98
|
+
$eq: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
limit: number;
|
|
102
|
+
page: number;
|
|
103
|
+
}, options: {
|
|
104
|
+
/**
|
|
105
|
+
* 将来的にcontainedInPlace最小化のためオプション採用(2026-09-17~)
|
|
106
|
+
*/
|
|
107
|
+
minimizeContainedInPlace: boolean;
|
|
108
|
+
}): Promise<Pick<factory.place.screeningRoom.IPlace, 'additionalProperty' | 'address' | 'branchCode' | 'containedInPlace' | 'maximumAttendeeCapacity' | 'name' | 'openSeatingAllowed' | 'typeOf' | 'seatCount' | 'sectionCount'>[]>;
|
|
88
109
|
findRooms(params: Omit<factory.place.screeningRoom.ISearchConditions, '$projection'>): Promise<Pick<factory.place.screeningRoom.IPlace, 'additionalProperty' | 'address' | 'branchCode' | 'name' | 'openSeatingAllowed' | 'maximumAttendeeCapacity'>[]>;
|
|
89
110
|
/**
|
|
90
111
|
* セクションと座席も含めたひとつのルームを取得する
|
|
@@ -128,7 +149,7 @@ export declare class ScreeningRoomRepo {
|
|
|
128
149
|
description?: any;
|
|
129
150
|
openingHoursSpecification?: any;
|
|
130
151
|
smokingAllowed?: boolean;
|
|
131
|
-
containsPlace: (Pick<import("@chevre/factory/lib/chevre/place/screeningRoomSection").IPlace, "name" | "typeOf" | "
|
|
152
|
+
containsPlace: (Pick<import("@chevre/factory/lib/chevre/place/screeningRoomSection").IPlace, "name" | "typeOf" | "branchCode" | "additionalProperty"> & {
|
|
132
153
|
containsPlace?: factory.place.seat.IPlace[];
|
|
133
154
|
})[];
|
|
134
155
|
} & {
|
|
@@ -139,7 +160,7 @@ export declare class ScreeningRoomRepo {
|
|
|
139
160
|
description?: any;
|
|
140
161
|
openingHoursSpecification?: any;
|
|
141
162
|
smokingAllowed?: boolean;
|
|
142
|
-
containsPlace: (Pick<import("@chevre/factory/lib/chevre/place/screeningRoomSection").IPlace, "name" | "typeOf" | "
|
|
163
|
+
containsPlace: (Pick<import("@chevre/factory/lib/chevre/place/screeningRoomSection").IPlace, "name" | "typeOf" | "branchCode" | "additionalProperty"> & {
|
|
143
164
|
containsPlace?: factory.place.seat.IPlace[];
|
|
144
165
|
})[];
|
|
145
166
|
} & {
|
|
@@ -379,10 +379,15 @@ class ScreeningRoomRepo {
|
|
|
379
379
|
})
|
|
380
380
|
.exec();
|
|
381
381
|
}
|
|
382
|
-
|
|
382
|
+
/**
|
|
383
|
+
* ルーム検索
|
|
384
|
+
* sectionCount,seatCountのprojectが可能
|
|
385
|
+
* sortはbranchCode: factory.sortType.Ascendingで固定
|
|
386
|
+
*/
|
|
387
|
+
async projectRoomFields(params, options) {
|
|
388
|
+
const { minimizeContainedInPlace } = options;
|
|
383
389
|
const aggregate = this.placeModel.aggregate([
|
|
384
|
-
|
|
385
|
-
...ScreeningRoomRepo.CREATE_ROOM_MONGO_CONDITIONS(searchConditions),
|
|
390
|
+
...ScreeningRoomRepo.CREATE_ROOM_MONGO_CONDITIONS(params),
|
|
386
391
|
{
|
|
387
392
|
$project: {
|
|
388
393
|
_id: 0,
|
|
@@ -390,16 +395,20 @@ class ScreeningRoomRepo {
|
|
|
390
395
|
branchCode: '$branchCode',
|
|
391
396
|
name: '$name',
|
|
392
397
|
address: '$address',
|
|
393
|
-
containedInPlace:
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
398
|
+
containedInPlace: (minimizeContainedInPlace)
|
|
399
|
+
? {
|
|
400
|
+
branchCode: '$containedInPlace.branchCode',
|
|
401
|
+
}
|
|
402
|
+
: {
|
|
403
|
+
id: '$containedInPlace.id',
|
|
404
|
+
typeOf: '$containedInPlace.typeOf',
|
|
405
|
+
branchCode: '$containedInPlace.branchCode',
|
|
406
|
+
name: '$containedInPlace.name'
|
|
407
|
+
},
|
|
399
408
|
openSeatingAllowed: '$openSeatingAllowed',
|
|
400
409
|
additionalProperty: '$additionalProperty',
|
|
401
410
|
maximumAttendeeCapacity: '$maximumAttendeeCapacity',
|
|
402
|
-
...(
|
|
411
|
+
...(params.$projection?.sectionCount === 1)
|
|
403
412
|
? {
|
|
404
413
|
sectionCount: {
|
|
405
414
|
$cond: {
|
|
@@ -410,7 +419,7 @@ class ScreeningRoomRepo {
|
|
|
410
419
|
}
|
|
411
420
|
}
|
|
412
421
|
: undefined,
|
|
413
|
-
...(
|
|
422
|
+
...(params.$projection?.seatCount === 1)
|
|
414
423
|
? {
|
|
415
424
|
seatCount: {
|
|
416
425
|
$sum: {
|
|
@@ -429,14 +438,16 @@ class ScreeningRoomRepo {
|
|
|
429
438
|
}
|
|
430
439
|
: undefined
|
|
431
440
|
}
|
|
432
|
-
}
|
|
441
|
+
},
|
|
442
|
+
{ $sort: { branchCode: factory_1.factory.sortType.Ascending } }
|
|
433
443
|
]);
|
|
434
|
-
|
|
435
|
-
if (typeof
|
|
436
|
-
|
|
437
|
-
aggregate.limit(searchConditions.limit * page)
|
|
438
|
-
.skip(searchConditions.limit * (page - 1));
|
|
444
|
+
const { limit, page } = params;
|
|
445
|
+
if (typeof limit !== 'number' || limit === 0) {
|
|
446
|
+
throw new factory_1.factory.errors.ArgumentNull('limit', 'must be number > 0');
|
|
439
447
|
}
|
|
448
|
+
const pageMustBePositive = (typeof page === 'number' && page > 0) ? page : 1;
|
|
449
|
+
aggregate.skip(limit * (pageMustBePositive - 1))
|
|
450
|
+
.limit(limit);
|
|
440
451
|
return aggregate
|
|
441
452
|
.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
442
453
|
.exec();
|
|
@@ -37,11 +37,11 @@ export declare class PriceSpecificationRepo {
|
|
|
37
37
|
};
|
|
38
38
|
}): Promise<void>;
|
|
39
39
|
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
|
|
40
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
41
40
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
41
|
+
typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
|
|
42
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
42
43
|
price: number;
|
|
43
44
|
priceCurrency: factory.priceCurrency;
|
|
44
|
-
typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
|
|
45
45
|
valueAddedTaxIncluded: boolean;
|
|
46
46
|
accounting?: never | undefined;
|
|
47
47
|
appliesToCategoryCode: import("@chevre/factory/lib/chevre/priceSpecification/categoryCodeChargeSpecification").IAppliesToCategoryCode[];
|
|
@@ -53,11 +53,11 @@ export declare class PriceSpecificationRepo {
|
|
|
53
53
|
} & {
|
|
54
54
|
__v: number;
|
|
55
55
|
}) | ({
|
|
56
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
57
56
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
57
|
+
typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
|
|
58
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
58
59
|
price: number;
|
|
59
60
|
priceCurrency: factory.priceCurrency;
|
|
60
|
-
typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
|
|
61
61
|
valueAddedTaxIncluded: boolean;
|
|
62
62
|
accounting?: never | undefined;
|
|
63
63
|
appliesToMovieTicket: import("@chevre/factory/lib/chevre/priceSpecification/movieTicketTypeChargeSpecification").IAppliesToMovieTicket;
|
|
@@ -70,11 +70,11 @@ export declare class PriceSpecificationRepo {
|
|
|
70
70
|
} & {
|
|
71
71
|
__v: number;
|
|
72
72
|
})), import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
|
|
73
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
74
73
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
74
|
+
typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
|
|
75
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
75
76
|
price: number;
|
|
76
77
|
priceCurrency: factory.priceCurrency;
|
|
77
|
-
typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
|
|
78
78
|
valueAddedTaxIncluded: boolean;
|
|
79
79
|
accounting?: never | undefined;
|
|
80
80
|
appliesToCategoryCode: import("@chevre/factory/lib/chevre/priceSpecification/categoryCodeChargeSpecification").IAppliesToCategoryCode[];
|
|
@@ -86,11 +86,11 @@ export declare class PriceSpecificationRepo {
|
|
|
86
86
|
} & {
|
|
87
87
|
__v: number;
|
|
88
88
|
}) | ({
|
|
89
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
90
89
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
90
|
+
typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
|
|
91
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
91
92
|
price: number;
|
|
92
93
|
priceCurrency: factory.priceCurrency;
|
|
93
|
-
typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
|
|
94
94
|
valueAddedTaxIncluded: boolean;
|
|
95
95
|
accounting?: never | undefined;
|
|
96
96
|
appliesToMovieTicket: import("@chevre/factory/lib/chevre/priceSpecification/movieTicketTypeChargeSpecification").IAppliesToMovieTicket;
|
|
@@ -22,42 +22,36 @@ export declare class ProjectRepo {
|
|
|
22
22
|
*/
|
|
23
23
|
projectFields(conditions: factory.project.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<factory.project.IProject[]>;
|
|
24
24
|
createById(params: factory.project.IProject): Promise<Pick<factory.project.IProject, 'id'>>;
|
|
25
|
-
|
|
25
|
+
updateProjectById(params: {
|
|
26
26
|
id: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
useEventServiceAsProduct?: boolean;
|
|
27
|
+
$set: {
|
|
28
|
+
alternateName?: string;
|
|
29
|
+
logo?: string;
|
|
30
|
+
hasMerchantReturnPolicy?: Pick<factory.project.IHasMerchantReturnPolicy, 'sameAs' | 'identifier'>;
|
|
31
|
+
name?: string;
|
|
32
|
+
settings?: {
|
|
33
|
+
sendEmailMessage?: factory.project.ISendEmailMessageSettings;
|
|
34
|
+
sendgridApiKey?: string;
|
|
35
|
+
};
|
|
37
36
|
};
|
|
37
|
+
$unset: Record<string, 1>;
|
|
38
38
|
}): Promise<void>;
|
|
39
39
|
updateMakesOfferById(params: {
|
|
40
40
|
id: string;
|
|
41
41
|
makesOffer: factory.project.IMakesOffer[];
|
|
42
42
|
}): Promise<void>;
|
|
43
|
-
updateAggregateReservation(params: {
|
|
44
|
-
id: string;
|
|
45
|
-
aggregateReservation?: any;
|
|
46
|
-
}): Promise<void>;
|
|
47
43
|
deleteById(params: {
|
|
48
44
|
id: string;
|
|
49
45
|
}): Promise<void>;
|
|
50
|
-
getCursor(conditions: FilterQuery<factory.project.IProject>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> &
|
|
46
|
+
getCursor(conditions: FilterQuery<factory.project.IProject>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<factory.project.IProject, "name" | "typeOf" | "logo" | "alternateName" | "hasMerchantReturnPolicy" | "settings" | "subscription"> & {
|
|
51
47
|
_id: string;
|
|
52
|
-
aggregateReservation?: any;
|
|
53
48
|
makesOffer?: factory.project.IMakesOffer[];
|
|
54
49
|
} & Required<{
|
|
55
50
|
_id: string;
|
|
56
51
|
}> & {
|
|
57
52
|
__v: number;
|
|
58
|
-
}, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> &
|
|
53
|
+
}, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<factory.project.IProject, "name" | "typeOf" | "logo" | "alternateName" | "hasMerchantReturnPolicy" | "settings" | "subscription"> & {
|
|
59
54
|
_id: string;
|
|
60
|
-
aggregateReservation?: any;
|
|
61
55
|
makesOffer?: factory.project.IMakesOffer[];
|
|
62
56
|
} & Required<{
|
|
63
57
|
_id: string;
|
|
@@ -5,7 +5,6 @@ const project_1 = require("./mongoose/schemas/project");
|
|
|
5
5
|
const factory_1 = require("../factory");
|
|
6
6
|
const settings_1 = require("../settings");
|
|
7
7
|
const AVAILABLE_PROJECT_FIELDS = [
|
|
8
|
-
// 'aggregateReservation',
|
|
9
8
|
'alternateName',
|
|
10
9
|
'logo',
|
|
11
10
|
'hasMerchantReturnPolicy',
|
|
@@ -110,45 +109,41 @@ class ProjectRepo {
|
|
|
110
109
|
}
|
|
111
110
|
return { id: insertedId };
|
|
112
111
|
}
|
|
113
|
-
async
|
|
112
|
+
async updateProjectById(params) {
|
|
113
|
+
const { $set, $unset, id } = params;
|
|
114
114
|
let hasMerchantReturnPolicy;
|
|
115
|
-
if (typeof
|
|
115
|
+
if (typeof $set.hasMerchantReturnPolicy?.sameAs === 'string') {
|
|
116
116
|
hasMerchantReturnPolicy = {
|
|
117
|
-
sameAs:
|
|
117
|
+
sameAs: $set.hasMerchantReturnPolicy.sameAs,
|
|
118
118
|
typeOf: 'MerchantReturnPolicy',
|
|
119
|
-
...(typeof
|
|
120
|
-
? { identifier:
|
|
119
|
+
...(typeof $set.hasMerchantReturnPolicy.identifier === 'string')
|
|
120
|
+
? { identifier: $set.hasMerchantReturnPolicy.identifier } : undefined
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
: undefined,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
123
|
+
await this.projectModel.updateOne({ _id: { $eq: id } }, {
|
|
124
|
+
$set: {
|
|
125
|
+
...(typeof $set.alternateName === 'string' && $set.alternateName.length > 0)
|
|
126
|
+
? { alternateName: $set.alternateName }
|
|
127
|
+
: undefined,
|
|
128
|
+
...(typeof $set.name === 'string' && $set.name.length > 0) ? { name: $set.name } : undefined,
|
|
129
|
+
...(typeof $set.logo === 'string' && $set.logo.length > 0) ? { logo: $set.logo } : undefined,
|
|
130
|
+
...(typeof $set.settings?.sendEmailMessage?.sender?.email === 'string')
|
|
131
|
+
? {
|
|
132
|
+
'settings.sendEmailMessage': {
|
|
133
|
+
sender: { email: $set.settings.sendEmailMessage.sender.email }
|
|
134
|
+
}
|
|
135
135
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
: undefined,
|
|
141
|
-
|
|
142
|
-
? { 'settings.includeCustomerAsFindByConfirmationNumberResult': includeCustomerAsFindByConfirmationNumberResult }
|
|
143
|
-
: undefined,
|
|
144
|
-
...(typeof params.subscription?.useEventServiceAsProduct === 'boolean')
|
|
145
|
-
? { 'subscription.useEventServiceAsProduct': params.subscription.useEventServiceAsProduct }
|
|
146
|
-
: undefined,
|
|
147
|
-
...(hasMerchantReturnPolicy !== undefined) ? { hasMerchantReturnPolicy } : undefined,
|
|
136
|
+
: undefined,
|
|
137
|
+
...(typeof $set.settings?.sendgridApiKey === 'string')
|
|
138
|
+
? { 'settings.sendgridApiKey': $set.settings.sendgridApiKey }
|
|
139
|
+
: undefined,
|
|
140
|
+
...(hasMerchantReturnPolicy !== undefined) ? { hasMerchantReturnPolicy } : undefined,
|
|
141
|
+
},
|
|
148
142
|
$unset: {
|
|
149
|
-
|
|
143
|
+
...$unset,
|
|
144
|
+
'settings.cognito': 1, // 廃止(2023-11-10~)
|
|
150
145
|
}
|
|
151
|
-
}
|
|
146
|
+
})
|
|
152
147
|
.exec();
|
|
153
148
|
}
|
|
154
149
|
async updateMakesOfferById(params) {
|
|
@@ -157,17 +152,6 @@ class ProjectRepo {
|
|
|
157
152
|
}, { projection: { _id: 1 } })
|
|
158
153
|
.exec();
|
|
159
154
|
}
|
|
160
|
-
async updateAggregateReservation(params) {
|
|
161
|
-
await this.projectModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
|
|
162
|
-
$set: {
|
|
163
|
-
...(params.aggregateReservation !== undefined) ? { aggregateReservation: params.aggregateReservation } : undefined
|
|
164
|
-
}
|
|
165
|
-
// $unset: {
|
|
166
|
-
// noExistingAttributeName: 1 // $unsetは空だとエラーになるので
|
|
167
|
-
// }
|
|
168
|
-
}, { new: true, projection: { _id: 1 } })
|
|
169
|
-
.exec();
|
|
170
|
-
}
|
|
171
155
|
async deleteById(params) {
|
|
172
156
|
await this.projectModel.deleteOne({ _id: { $eq: params.id } }, { projection: { _id: 1 } })
|
|
173
157
|
.exec();
|
|
@@ -42,8 +42,8 @@ class ProjectMakesOfferRepo {
|
|
|
42
42
|
]);
|
|
43
43
|
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
44
44
|
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
45
|
-
aggregate.
|
|
46
|
-
.
|
|
45
|
+
aggregate.skip(params.limit * (page - 1))
|
|
46
|
+
.limit(params.limit);
|
|
47
47
|
}
|
|
48
48
|
return aggregate.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
49
49
|
.exec();
|
|
@@ -59,7 +59,7 @@ export declare class RoleRepo {
|
|
|
59
59
|
} & {
|
|
60
60
|
__v: number;
|
|
61
61
|
}) | null>;
|
|
62
|
-
|
|
62
|
+
addRole(params: Pick<IRole, 'member' | 'memberOf' | 'permissions' | 'roleName'>): Promise<{
|
|
63
63
|
id: string;
|
|
64
64
|
}>;
|
|
65
65
|
deleteByRoleName(params: Pick<IRole, 'roleName'>): Promise<import("mongodb").DeleteResult>;
|
package/lib/chevre/repo/role.js
CHANGED
|
@@ -69,35 +69,6 @@ class RoleRepo {
|
|
|
69
69
|
.lean() // 2024-08-23~
|
|
70
70
|
.exec();
|
|
71
71
|
}
|
|
72
|
-
// migrate to findDistinctPermissionsByRoleName(2025-07-21~)
|
|
73
|
-
// public async aggregatePermissions(params: {
|
|
74
|
-
// roleName: { $in: string[] };
|
|
75
|
-
// }): Promise<{ _id: string }[]> {
|
|
76
|
-
// const matchStages: IMatchStage[] = [
|
|
77
|
-
// { $match: { roleName: { $in: params.roleName.$in } } }
|
|
78
|
-
// ];
|
|
79
|
-
// const aggregate = this.roleModel.aggregate([
|
|
80
|
-
// ...matchStages,
|
|
81
|
-
// {
|
|
82
|
-
// $unwind: {
|
|
83
|
-
// path: '$permissions'
|
|
84
|
-
// }
|
|
85
|
-
// },
|
|
86
|
-
// {
|
|
87
|
-
// $project: {
|
|
88
|
-
// _id: 0,
|
|
89
|
-
// permission: '$permissions'
|
|
90
|
-
// }
|
|
91
|
-
// },
|
|
92
|
-
// {
|
|
93
|
-
// $group: {
|
|
94
|
-
// _id: '$permission'
|
|
95
|
-
// }
|
|
96
|
-
// }
|
|
97
|
-
// ]);
|
|
98
|
-
// return aggregate.option({ maxTimeMS: MONGO_MAX_TIME_MS })
|
|
99
|
-
// .exec();
|
|
100
|
-
// }
|
|
101
72
|
/**
|
|
102
73
|
* distinctコマンドを使用して、ロールから権限を検索する
|
|
103
74
|
*/
|
|
@@ -139,7 +110,7 @@ class RoleRepo {
|
|
|
139
110
|
.lean()
|
|
140
111
|
.exec();
|
|
141
112
|
}
|
|
142
|
-
async
|
|
113
|
+
async addRole(params) {
|
|
143
114
|
const { member, memberOf, permissions, roleName } = params;
|
|
144
115
|
const creatingRole = {
|
|
145
116
|
member, memberOf, permissions, roleName,
|
|
@@ -33,7 +33,7 @@ export declare class SellerRepo {
|
|
|
33
33
|
private readonly sellerModel;
|
|
34
34
|
constructor(connection: Connection);
|
|
35
35
|
static CREATE_MONGO_CONDITIONS(params: factory.seller.ISearchConditions & IMemberSearchConditions): FilterQuery<factory.seller.ISeller>[];
|
|
36
|
-
static CREATE_AGGREGATE_SELLERS_PROJECTION(
|
|
36
|
+
static CREATE_AGGREGATE_SELLERS_PROJECTION(inclusions: (Exclude<keyof ISellerByAggregate, 'id'>)[]): Record<string, AnyExpression>;
|
|
37
37
|
/**
|
|
38
38
|
* 販売者を保管する
|
|
39
39
|
*/
|
|
@@ -46,7 +46,10 @@ export declare class SellerRepo {
|
|
|
46
46
|
/**
|
|
47
47
|
* 集計検索(publicな属性検索が目的)
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
findSellersPublicFields(conditions: factory.seller.ISearchConditions & IMemberSearchConditions & {
|
|
50
|
+
limit: number;
|
|
51
|
+
page: number;
|
|
52
|
+
}, inclusions: (Exclude<keyof ISellerByAggregate, 'id'>)[]): Promise<ISellerByAggregate[]>;
|
|
50
53
|
/**
|
|
51
54
|
* 販売者検索
|
|
52
55
|
*/
|
|
@@ -72,11 +75,15 @@ export declare class SellerRepo {
|
|
|
72
75
|
id: string;
|
|
73
76
|
makesOffer: factory.seller.IMakesOffer;
|
|
74
77
|
}): Promise<void>;
|
|
75
|
-
getCursor(conditions: FilterQuery<factory.seller.ISeller>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> &
|
|
78
|
+
getCursor(conditions: FilterQuery<factory.seller.ISeller>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<factory.seller.ISeller, "name" | "typeOf" | "branchCode" | "additionalProperty" | "project" | "url" | "telephone" | "makesOffer" | "hasMerchantReturnPolicy"> & {
|
|
79
|
+
paymentAccepted?: factory.seller.IPaymentAccepted[];
|
|
80
|
+
} & {
|
|
76
81
|
_id: Types.ObjectId;
|
|
77
82
|
} & {
|
|
78
83
|
__v: number;
|
|
79
|
-
}, QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> &
|
|
84
|
+
}, QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<factory.seller.ISeller, "name" | "typeOf" | "branchCode" | "additionalProperty" | "project" | "url" | "telephone" | "makesOffer" | "hasMerchantReturnPolicy"> & {
|
|
85
|
+
paymentAccepted?: factory.seller.IPaymentAccepted[];
|
|
86
|
+
} & {
|
|
80
87
|
_id: Types.ObjectId;
|
|
81
88
|
} & {
|
|
82
89
|
__v: number;
|