@chevre/domain 28.0.0-alpha.4 → 28.0.0-alpha.5
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/repo/adminEvent.d.ts +0 -6
- package/lib/chevre/repo/adminEvent.js +3 -9
- package/lib/chevre/repo/aggregateEvent.js +0 -1
- package/lib/chevre/repo/event.d.ts +2 -2
- package/lib/chevre/repo/event.js +71 -110
- package/lib/chevre/repo/mongoose/schemas/transaction.js +24 -25
- package/lib/chevre/repo/transaction/placeOrder.d.ts +1 -1
- package/lib/chevre/repo/transaction/placeOrder.js +9 -8
- package/lib/chevre/service/aggregation/event/aggregateOffers.js +1 -2
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +0 -1
- package/lib/chevre/service/assetTransaction/pay/start/preStart/validateAcceptedPaymentMethodIfNeeded.js +1 -2
- package/lib/chevre/service/event.js +0 -1
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +0 -1
- package/lib/chevre/service/offer/onEventChanged.js +2 -4
- package/lib/chevre/service/offer.js +1 -2
- package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -2
- package/package.json +2 -2
|
@@ -170,9 +170,6 @@ export declare class AdminEventRepo {
|
|
|
170
170
|
};
|
|
171
171
|
}): Promise<mongo.DeleteResult>;
|
|
172
172
|
deleteManyEventsEndedByProject(params: {
|
|
173
|
-
typeOf: {
|
|
174
|
-
$in: factory.eventType.ScreeningEvent[];
|
|
175
|
-
};
|
|
176
173
|
project: {
|
|
177
174
|
id: string;
|
|
178
175
|
};
|
|
@@ -181,9 +178,6 @@ export declare class AdminEventRepo {
|
|
|
181
178
|
};
|
|
182
179
|
}): Promise<mongo.DeleteResult>;
|
|
183
180
|
deleteManyEventsEnded(params: {
|
|
184
|
-
typeOf: {
|
|
185
|
-
$eq: factory.eventType.ScreeningEvent;
|
|
186
|
-
};
|
|
187
181
|
endDate: {
|
|
188
182
|
$lte: Date;
|
|
189
183
|
};
|
|
@@ -155,8 +155,7 @@ class AdminEventRepo {
|
|
|
155
155
|
}
|
|
156
156
|
const doc = await this.eventModel.findOneAndUpdate({
|
|
157
157
|
_id: { $eq: params.id },
|
|
158
|
-
'project.id': { $eq: params.project.id }
|
|
159
|
-
typeOf: { $eq: typeOf }
|
|
158
|
+
'project.id': { $eq: params.project.id }
|
|
160
159
|
}, {
|
|
161
160
|
$set: updateFields
|
|
162
161
|
}, { upsert: false, new: false, projection: { _id: 1 } })
|
|
@@ -187,8 +186,7 @@ class AdminEventRepo {
|
|
|
187
186
|
}
|
|
188
187
|
try {
|
|
189
188
|
doc = await this.eventModel.findOneAndUpdate({
|
|
190
|
-
_id: { $eq: params.id }
|
|
191
|
-
typeOf: { $eq: typeOf }
|
|
189
|
+
_id: { $eq: params.id }
|
|
192
190
|
}, {
|
|
193
191
|
// 編集のためのみのメソッドになったので、setOnInsertは廃止(2025-10-27~)
|
|
194
192
|
// 上書き禁止属性を除外(2022-08-24~)
|
|
@@ -231,8 +229,7 @@ class AdminEventRepo {
|
|
|
231
229
|
bulkWriteOps.push({
|
|
232
230
|
updateOne: {
|
|
233
231
|
filter: {
|
|
234
|
-
_id: p.id
|
|
235
|
-
typeOf: p.attributes.typeOf
|
|
232
|
+
_id: p.id
|
|
236
233
|
},
|
|
237
234
|
update: {
|
|
238
235
|
$setOnInsert: {
|
|
@@ -279,7 +276,6 @@ class AdminEventRepo {
|
|
|
279
276
|
async syncScreeningEventSeries2screeningEvents(params) {
|
|
280
277
|
const superEvent = EventFactory.minimizeSuperEvent({ superEventFromDB: params.superEventFromDB });
|
|
281
278
|
await this.eventModel.updateMany({
|
|
282
|
-
typeOf: { $eq: factory_1.factory.eventType.ScreeningEvent },
|
|
283
279
|
'project.id': { $eq: params.project.id },
|
|
284
280
|
'superEvent.id': { $exists: true, $eq: params.superEventFromDB.id },
|
|
285
281
|
startDate: { $gte: params.startDate.$gte }
|
|
@@ -338,7 +334,6 @@ class AdminEventRepo {
|
|
|
338
334
|
}
|
|
339
335
|
async deleteManyEventsEndedByProject(params) {
|
|
340
336
|
return this.eventModel.deleteMany({
|
|
341
|
-
typeOf: { $in: params.typeOf.$in },
|
|
342
337
|
'project.id': { $eq: params.project.id },
|
|
343
338
|
endDate: { $lte: params.endDate.$lte }
|
|
344
339
|
})
|
|
@@ -346,7 +341,6 @@ class AdminEventRepo {
|
|
|
346
341
|
}
|
|
347
342
|
async deleteManyEventsEnded(params) {
|
|
348
343
|
return this.eventModel.deleteMany({
|
|
349
|
-
typeOf: { $eq: params.typeOf.$eq },
|
|
350
344
|
endDate: { $lte: params.endDate.$lte }
|
|
351
345
|
})
|
|
352
346
|
.exec();
|
|
@@ -22,7 +22,6 @@ class AggregateEventRepo {
|
|
|
22
22
|
$gte: params.startFrom,
|
|
23
23
|
$lte: params.startThrough
|
|
24
24
|
},
|
|
25
|
-
typeOf: { $eq: params.typeOf },
|
|
26
25
|
eventStatus: { $eq: eventStatus },
|
|
27
26
|
...(typeof params.project?.id?.$ne === 'string')
|
|
28
27
|
? { 'project.id': { $ne: params.project.id.$ne } }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Connection, FilterQuery } from 'mongoose';
|
|
2
2
|
import { factory } from '../factory';
|
|
3
3
|
import * as EventFactory from '../factory/event';
|
|
4
|
-
export type ISearchConditions = factory.event.screeningEvent.ISearchConditions;
|
|
4
|
+
export type ISearchConditions = Pick<factory.event.screeningEvent.ISearchConditions, 'additionalProperty' | 'endFrom' | 'endThrough' | 'eventStatuses' | 'id' | 'identifiers' | 'inSessionFrom' | 'inSessionThrough' | 'limit' | 'location' | 'offers' | 'organizer' | 'page' | 'project' | 'sort' | 'startFrom' | 'startThrough' | 'superEvent'> & {};
|
|
5
5
|
export import IMinimizedIndividualEvent = EventFactory.IMinimizedIndividualEvent;
|
|
6
6
|
type IKeyOfProjection = Exclude<keyof factory.event.screeningEvent.IEvent, 'id'> | 'aggregateOffer' | 'superEvent.location.id' | 'offers.itemOffered' | 'offers.itemOffered.id' | 'offers.typeOf';
|
|
7
7
|
type IKeyOfProjection4publicFields = Exclude<keyof factory.event.screeningEvent.IEvent, 'id' | 'offers'>;
|
|
@@ -60,7 +60,7 @@ export declare class EventRepo {
|
|
|
60
60
|
/**
|
|
61
61
|
* COAイベントキャンセル時に使用
|
|
62
62
|
*/
|
|
63
|
-
searchEventIds(params: Pick<ISearchConditions, 'project' | '
|
|
63
|
+
searchEventIds(params: Pick<ISearchConditions, 'project' | 'superEvent' | 'startFrom' | 'startThrough'>): Promise<string[]>;
|
|
64
64
|
/**
|
|
65
65
|
* 特定イベントから指定フィールドのみ取得する
|
|
66
66
|
* イベント IDは必ず返ります
|
package/lib/chevre/repo/event.js
CHANGED
|
@@ -22,18 +22,18 @@ class EventRepo {
|
|
|
22
22
|
}
|
|
23
23
|
static CREATE_MONGO_CONDITIONS(conditions) {
|
|
24
24
|
const andConditions = [];
|
|
25
|
-
const typeOfEq = conditions.typeOf;
|
|
26
|
-
if (typeof typeOfEq === 'string') {
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
const typeOfIn = conditions.typeOfIn;
|
|
30
|
-
if (Array.isArray(typeOfIn)) {
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
// typeOf条件必須検証(2023-07-13~)
|
|
34
|
-
if (typeof typeOfEq !== 'string' && !Array.isArray(typeOfIn)) {
|
|
35
|
-
|
|
36
|
-
}
|
|
25
|
+
// const typeOfEq = conditions.typeOf;
|
|
26
|
+
// if (typeof typeOfEq === 'string') {
|
|
27
|
+
// andConditions.push({ typeOf: { $eq: typeOfEq } });
|
|
28
|
+
// }
|
|
29
|
+
// const typeOfIn = conditions.typeOfIn;
|
|
30
|
+
// if (Array.isArray(typeOfIn)) {
|
|
31
|
+
// andConditions.push({ typeOf: { $in: typeOfIn } });
|
|
32
|
+
// }
|
|
33
|
+
// // typeOf条件必須検証(2023-07-13~)
|
|
34
|
+
// if (typeof typeOfEq !== 'string' && !Array.isArray(typeOfIn)) {
|
|
35
|
+
// throw new factory.errors.ArgumentNull('typeOf');
|
|
36
|
+
// }
|
|
37
37
|
const projectIdEq = conditions.project?.id?.$eq;
|
|
38
38
|
if (typeof projectIdEq === 'string') {
|
|
39
39
|
andConditions.push({ 'project.id': { $eq: projectIdEq } });
|
|
@@ -113,110 +113,72 @@ class EventRepo {
|
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
// $or: [
|
|
124
|
-
// {
|
|
125
|
-
// 'name.ja': {
|
|
126
|
-
// $exists: true,
|
|
127
|
-
// $regex: new RegExp(params.name)
|
|
128
|
-
// }
|
|
129
|
-
// },
|
|
130
|
-
// {
|
|
131
|
-
// 'name.en': {
|
|
132
|
-
// $exists: true,
|
|
133
|
-
// $regex: new RegExp(params.name)
|
|
134
|
-
// }
|
|
135
|
-
// }
|
|
136
|
-
// ]
|
|
137
|
-
// });
|
|
138
|
-
// }
|
|
139
|
-
/* istanbul ignore else */
|
|
140
|
-
const superEventLocationIdEq = params.superEvent?.location?.id?.$eq;
|
|
141
|
-
if (typeof superEventLocationIdEq === 'string') {
|
|
142
|
-
andConditions.push({
|
|
143
|
-
'superEvent.location.id': {
|
|
144
|
-
$exists: true,
|
|
145
|
-
$eq: superEventLocationIdEq
|
|
146
|
-
}
|
|
147
|
-
});
|
|
116
|
+
/* istanbul ignore else */
|
|
117
|
+
const superEventLocationIdEq = conditions.superEvent?.location?.id?.$eq;
|
|
118
|
+
if (typeof superEventLocationIdEq === 'string') {
|
|
119
|
+
andConditions.push({
|
|
120
|
+
'superEvent.location.id': {
|
|
121
|
+
$exists: true,
|
|
122
|
+
$eq: superEventLocationIdEq
|
|
148
123
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/* istanbul ignore else */
|
|
127
|
+
if (conditions.superEvent !== undefined) {
|
|
128
|
+
/* istanbul ignore else */
|
|
129
|
+
if (Array.isArray(conditions.superEvent.ids)) {
|
|
130
|
+
andConditions.push({
|
|
131
|
+
'superEvent.id': {
|
|
132
|
+
$exists: true,
|
|
133
|
+
$in: conditions.superEvent.ids
|
|
159
134
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/* istanbul ignore else */
|
|
138
|
+
if (Array.isArray(conditions.superEvent.locationBranchCodes)) {
|
|
139
|
+
andConditions.push({
|
|
140
|
+
'superEvent.location.branchCode': {
|
|
141
|
+
$exists: true,
|
|
142
|
+
$in: conditions.superEvent.locationBranchCodes
|
|
168
143
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/* istanbul ignore else */
|
|
147
|
+
if (Array.isArray(conditions.superEvent.workPerformedIdentifiers)) {
|
|
148
|
+
andConditions.push({
|
|
149
|
+
'superEvent.workPerformed.identifier': {
|
|
150
|
+
$exists: true,
|
|
151
|
+
$in: conditions.superEvent.workPerformedIdentifiers
|
|
177
152
|
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
const itemOfferedIdIn = conditions.offers?.itemOffered?.id?.$in;
|
|
157
|
+
if (Array.isArray(itemOfferedIdIn)) {
|
|
158
|
+
andConditions.push({
|
|
159
|
+
'offers.itemOffered.id': {
|
|
160
|
+
$exists: true,
|
|
161
|
+
$in: itemOfferedIdIn
|
|
178
162
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
const itemOfferedTicketedSeatTypeOfIn = params.offers?.itemOffered?.serviceOutput?.reservedTicket?.ticketedSeat?.typeOfs;
|
|
189
|
-
if (Array.isArray(itemOfferedTicketedSeatTypeOfIn)) {
|
|
190
|
-
andConditions.push({
|
|
191
|
-
'offers.itemOffered.serviceOutput.reservedTicket.ticketedSeat.typeOf': {
|
|
192
|
-
$exists: true,
|
|
193
|
-
$in: itemOfferedTicketedSeatTypeOfIn
|
|
194
|
-
}
|
|
195
|
-
});
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
const itemOfferedTicketedSeatTypeOfIn = conditions.offers?.itemOffered?.serviceOutput?.reservedTicket?.ticketedSeat?.typeOfs;
|
|
166
|
+
if (Array.isArray(itemOfferedTicketedSeatTypeOfIn)) {
|
|
167
|
+
andConditions.push({
|
|
168
|
+
'offers.itemOffered.serviceOutput.reservedTicket.ticketedSeat.typeOf': {
|
|
169
|
+
$exists: true,
|
|
170
|
+
$in: itemOfferedTicketedSeatTypeOfIn
|
|
196
171
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
// }
|
|
206
|
-
const sellerMakesOfferElemMatch = params.offers?.seller?.makesOffer?.$elemMatch;
|
|
207
|
-
if (typeof sellerMakesOfferElemMatch?.['availableAtOrFrom.id']?.$eq === 'string') {
|
|
208
|
-
andConditions.push({
|
|
209
|
-
'offers.seller.makesOffer': {
|
|
210
|
-
$exists: true,
|
|
211
|
-
$elemMatch: sellerMakesOfferElemMatch
|
|
212
|
-
}
|
|
213
|
-
});
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
const sellerMakesOfferElemMatch = conditions.offers?.seller?.makesOffer?.$elemMatch;
|
|
175
|
+
if (typeof sellerMakesOfferElemMatch?.['availableAtOrFrom.id']?.$eq === 'string') {
|
|
176
|
+
andConditions.push({
|
|
177
|
+
'offers.seller.makesOffer': {
|
|
178
|
+
$exists: true,
|
|
179
|
+
$elemMatch: sellerMakesOfferElemMatch
|
|
214
180
|
}
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
case factory_1.factory.eventType.ScreeningEventSeries: // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
218
|
-
throw new factory_1.factory.errors.Internal('typeOf: ScreeningEventSeries discontinued');
|
|
219
|
-
default:
|
|
181
|
+
});
|
|
220
182
|
}
|
|
221
183
|
return andConditions;
|
|
222
184
|
}
|
|
@@ -339,7 +301,6 @@ class EventRepo {
|
|
|
339
301
|
const doc = await this.eventModel.findOne({
|
|
340
302
|
_id: { $eq: params.id.$eq },
|
|
341
303
|
'project.id': { $eq: params.project.id.$eq },
|
|
342
|
-
typeOf: { $in: [factory_1.factory.eventType.ScreeningEvent] },
|
|
343
304
|
...(typeof params.organizer?.id.$eq === 'string')
|
|
344
305
|
? { 'organizer.id': { $exists: true, $eq: params.organizer.id.$eq } }
|
|
345
306
|
: undefined
|
|
@@ -4,7 +4,6 @@ exports.modelName = exports.indexes = void 0;
|
|
|
4
4
|
exports.createSchema = createSchema;
|
|
5
5
|
const mongoose_1 = require("mongoose");
|
|
6
6
|
const writeConcern_1 = require("../writeConcern");
|
|
7
|
-
const factory_1 = require("../../../factory");
|
|
8
7
|
const settings_1 = require("../../../settings");
|
|
9
8
|
const modelName = 'Transaction';
|
|
10
9
|
exports.modelName = modelName;
|
|
@@ -96,21 +95,21 @@ const indexes = [
|
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
97
|
],
|
|
99
|
-
[
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
],
|
|
98
|
+
// [
|
|
99
|
+
// // 注文取引のobject.orderNumberも発行されている場合ユニークなはず(2026-02-21~)
|
|
100
|
+
// {
|
|
101
|
+
// typeOf: 1,
|
|
102
|
+
// 'object.orderNumber': 1
|
|
103
|
+
// },
|
|
104
|
+
// {
|
|
105
|
+
// name: 'uniquePlacingOrderNumber',
|
|
106
|
+
// unique: true,
|
|
107
|
+
// partialFilterExpression: {
|
|
108
|
+
// typeOf: factory.transactionType.PlaceOrder,
|
|
109
|
+
// 'object.orderNumber': { $exists: true }
|
|
110
|
+
// }
|
|
111
|
+
// }
|
|
112
|
+
// ],
|
|
114
113
|
[
|
|
115
114
|
{ 'agent.typeOf': 1, startDate: -1 },
|
|
116
115
|
{
|
|
@@ -170,15 +169,6 @@ const indexes = [
|
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
],
|
|
173
|
-
[
|
|
174
|
-
{ 'tasksExportAction.actionStatus': 1, startDate: -1 },
|
|
175
|
-
{
|
|
176
|
-
name: 'searchByTasksExportActionActionStatus',
|
|
177
|
-
partialFilterExpression: {
|
|
178
|
-
'tasksExportAction.actionStatus': { $exists: true }
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
],
|
|
182
172
|
// typeOf: ReturnOrder廃止につき以下廃止(2026-09-08~)
|
|
183
173
|
// [
|
|
184
174
|
// { 'object.order.orderNumber': 1, startDate: -1 },
|
|
@@ -224,6 +214,15 @@ const indexes = [
|
|
|
224
214
|
// }
|
|
225
215
|
// }
|
|
226
216
|
// ],
|
|
217
|
+
// [
|
|
218
|
+
// { 'tasksExportAction.actionStatus': 1, startDate: -1 },
|
|
219
|
+
// {
|
|
220
|
+
// name: 'searchByTasksExportActionActionStatus',
|
|
221
|
+
// partialFilterExpression: {
|
|
222
|
+
// 'tasksExportAction.actionStatus': { $exists: true }
|
|
223
|
+
// }
|
|
224
|
+
// }
|
|
225
|
+
// ],
|
|
227
226
|
];
|
|
228
227
|
exports.indexes = indexes;
|
|
229
228
|
/**
|
|
@@ -17,7 +17,7 @@ export type IPlaceOrder = Pick<factory.transaction.placeOrder.ITransaction, IKey
|
|
|
17
17
|
};
|
|
18
18
|
type IStartedPlaceOrderFields = 'expires' | 'id' | 'startDate' | 'status';
|
|
19
19
|
export type IStartedPlaceOrder = Pick<factory.transaction.placeOrder.ITransaction, IStartedPlaceOrderFields>;
|
|
20
|
-
type IFindParams = Pick<factory.transaction.placeOrder.ISearchConditions, 'agent' | 'ids' | 'limit' | 'object' | 'page' | 'project' | 'seller' | 'sort' | 'startFrom' | 'startThrough' | 'status' | 'statuses'
|
|
20
|
+
type IFindParams = Pick<factory.transaction.placeOrder.ISearchConditions, 'agent' | 'ids' | 'limit' | 'object' | 'page' | 'project' | 'seller' | 'sort' | 'startFrom' | 'startThrough' | 'status' | 'statuses'> & {};
|
|
21
21
|
/**
|
|
22
22
|
* 注文取引リポジトリ
|
|
23
23
|
*/
|
|
@@ -110,14 +110,15 @@ class PlaceOrderRepo {
|
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
113
|
+
// discontinue(2026-09-11~)
|
|
114
|
+
// const tasksExportActionStatusIn = params.tasksExportAction?.actionStatus?.$in;
|
|
115
|
+
// if (Array.isArray(tasksExportActionStatusIn)) {
|
|
116
|
+
// andConditions.push({ 'tasksExportAction.actionStatus': { $exists: true, $in: tasksExportActionStatusIn } });
|
|
117
|
+
// }
|
|
118
|
+
// const tasksExportActionStatusEq = params.tasksExportAction?.actionStatus?.$eq;
|
|
119
|
+
// if (typeof tasksExportActionStatusEq === 'string') {
|
|
120
|
+
// andConditions.push({ 'tasksExportAction.actionStatus': { $exists: true, $eq: tasksExportActionStatusEq } });
|
|
121
|
+
// }
|
|
121
122
|
const sellerIdIn = params.seller?.ids;
|
|
122
123
|
if (Array.isArray(sellerIdIn)) {
|
|
123
124
|
andConditions.push({ 'seller.id': { $exists: true, $in: sellerIdIn } });
|
|
@@ -22,8 +22,7 @@ function aggregateOffers(params) {
|
|
|
22
22
|
const eventCapacity = (await repos.event.projectEventFields({
|
|
23
23
|
limit: 1,
|
|
24
24
|
page: 1,
|
|
25
|
-
id: { $eq: params.id }
|
|
26
|
-
typeOf: params.typeOf
|
|
25
|
+
id: { $eq: params.id }
|
|
27
26
|
}, ['maximumAttendeeCapacity', 'remainingAttendeeCapacity'])).shift();
|
|
28
27
|
debug('processing aggregateOffersByEvent...', eventCapacity);
|
|
29
28
|
await aggregateOffersByEvent({
|
|
@@ -53,7 +53,6 @@ function aggregateScreeningEvent(params) {
|
|
|
53
53
|
limit: 100,
|
|
54
54
|
page: 1,
|
|
55
55
|
project: { id: { $eq: event.project.id } },
|
|
56
|
-
typeOf: event.typeOf,
|
|
57
56
|
eventStatuses: [factory_1.factory.eventStatusType.EventScheduled],
|
|
58
57
|
startFrom: startFrom,
|
|
59
58
|
startThrough: startThrough,
|
|
@@ -81,8 +81,7 @@ function validateAcceptedPaymentMethodIfNeeded(params
|
|
|
81
81
|
const eventSeriesIds = (await repos.event.projectEventFields({
|
|
82
82
|
limit: checkingEventIds.length,
|
|
83
83
|
page: 1,
|
|
84
|
-
id: { $in: checkingEventIds }
|
|
85
|
-
typeOf: factory_1.factory.eventType.ScreeningEvent
|
|
84
|
+
id: { $in: checkingEventIds }
|
|
86
85
|
}, ['superEvent'])).map((event) => event.superEvent.id);
|
|
87
86
|
if (eventSeriesIds.length !== checkingEventIds.length) {
|
|
88
87
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.eventType.ScreeningEvent);
|
|
@@ -153,7 +153,6 @@ function cancelDeletedEvents(params) {
|
|
|
153
153
|
// COAから削除されたイベントをキャンセル済ステータスへ変更
|
|
154
154
|
const ids = await repos.event.searchEventIds({
|
|
155
155
|
project: { id: { $eq: params.project.id } },
|
|
156
|
-
typeOf: factory_1.factory.eventType.ScreeningEvent,
|
|
157
156
|
superEvent: {
|
|
158
157
|
locationBranchCodes: [params.locationBranchCode]
|
|
159
158
|
},
|
|
@@ -101,8 +101,7 @@ function createInformTasks(params, setting) {
|
|
|
101
101
|
const informEvents = setting?.onResourceUpdated?.informResource;
|
|
102
102
|
if (params.typeOf === factory_1.factory.eventType.ScreeningEvent) {
|
|
103
103
|
const screeningEvents4inform = await repos.event.projectEventFields({
|
|
104
|
-
id: { $in: params.ids }
|
|
105
|
-
typeOf: params.typeOf
|
|
104
|
+
id: { $in: params.ids }
|
|
106
105
|
}, [
|
|
107
106
|
'project', 'organizer', 'typeOf', 'name', 'doorTime', 'endDate',
|
|
108
107
|
'eventStatus', 'location', 'startDate', 'superEvent', 'offers', 'additionalProperty', 'identifier'
|
|
@@ -296,8 +295,7 @@ function syncEventEndDate2pendingReservations(params) {
|
|
|
296
295
|
const events = await repos.event.projectEventFields({
|
|
297
296
|
limit: 1,
|
|
298
297
|
page: 1,
|
|
299
|
-
id: { $eq: eventId }
|
|
300
|
-
typeOf: params.typeOf
|
|
298
|
+
id: { $eq: eventId }
|
|
301
299
|
}, ['endDate']);
|
|
302
300
|
const endDate = events.shift()?.endDate;
|
|
303
301
|
if (endDate instanceof Date) {
|
|
@@ -169,8 +169,7 @@ function findEventSeatOffersBySection(params) {
|
|
|
169
169
|
page: 1,
|
|
170
170
|
project: { id: { $eq: projectId } },
|
|
171
171
|
organizer: { id: { $eq: sellerId } },
|
|
172
|
-
id: { $eq: eventId }
|
|
173
|
-
typeOf: factory_1.factory.eventType.ScreeningEvent
|
|
172
|
+
id: { $eq: eventId }
|
|
174
173
|
}, ['startDate', 'offers.itemOffered', 'location', 'superEvent'])).shift();
|
|
175
174
|
if (event === undefined) {
|
|
176
175
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.eventType.ScreeningEvent);
|
|
@@ -36,8 +36,7 @@ function preStart(params) {
|
|
|
36
36
|
let events = [];
|
|
37
37
|
if (eventIds.length > 0) {
|
|
38
38
|
events = await repos.event.projectEventFields({
|
|
39
|
-
id: { $in: eventIds }
|
|
40
|
-
typeOf: factory_1.factory.eventType.ScreeningEvent
|
|
39
|
+
id: { $in: eventIds }
|
|
41
40
|
}, ['startDate']);
|
|
42
41
|
}
|
|
43
42
|
let returnPolicies = [];
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.1090.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.1090.0",
|
|
14
|
-
"@chevre/factory": "11.0.0-alpha.
|
|
14
|
+
"@chevre/factory": "11.0.0-alpha.2",
|
|
15
15
|
"@motionpicture/coa-service": "10.0.0",
|
|
16
16
|
"@motionpicture/gmo-service": "6.1.0-alpha.0",
|
|
17
17
|
"@sendgrid/client": "8.1.4",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"postversion": "git push origin --tags",
|
|
89
89
|
"prepublishOnly": "npm run clean && npm run build"
|
|
90
90
|
},
|
|
91
|
-
"version": "28.0.0-alpha.
|
|
91
|
+
"version": "28.0.0-alpha.5"
|
|
92
92
|
}
|