@chevre/domain 22.3.0-alpha.8 → 22.3.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/aggregation/createAggregateEventTasks.ts +1 -1
- package/example/src/chevre/importEventsFromCOA.ts +6 -3
- package/example/src/chevre/migrateAccountTitleAdditionalProperties.ts +9 -6
- package/example/src/chevre/migrateCustomerAdditionalProperties.ts +8 -6
- package/example/src/chevre/migrateEventSeries2secondary.ts +70 -0
- package/example/src/chevre/migrateRoomAdditionalProperties.ts +8 -6
- package/example/src/chevre/migrateRoomSectionAdditionalProperties.ts +8 -6
- package/example/src/chevre/projectFields.ts +6 -10
- package/example/src/chevre/unsetUnnecessaryFields.ts +15 -2
- package/example/src/chevre/upsertManyEventsByAdditionalProperty.ts +180 -0
- package/lib/chevre/repo/account.d.ts +25 -1
- package/lib/chevre/repo/accountTitle.d.ts +4 -4
- package/lib/chevre/repo/accountingReport.d.ts +25 -1
- package/lib/chevre/repo/action.d.ts +11 -11
- package/lib/chevre/repo/action.js +4 -7
- package/lib/chevre/repo/additionalProperty.d.ts +33 -8
- package/lib/chevre/repo/additionalProperty.js +52 -106
- package/lib/chevre/repo/aggregateOffer.d.ts +26 -2
- package/lib/chevre/repo/aggregateReservation.d.ts +25 -1
- package/lib/chevre/repo/aggregation.d.ts +26 -2
- package/lib/chevre/repo/assetTransaction.d.ts +5 -5
- package/lib/chevre/repo/authorization.d.ts +25 -1
- package/lib/chevre/repo/categoryCode.d.ts +1 -1
- package/lib/chevre/repo/comment.d.ts +3 -3
- package/lib/chevre/repo/creativeWork.d.ts +12 -10
- package/lib/chevre/repo/creativeWork.js +51 -23
- package/lib/chevre/repo/customer.d.ts +4 -4
- package/lib/chevre/repo/event.d.ts +55 -82
- package/lib/chevre/repo/event.js +130 -274
- package/lib/chevre/repo/eventSeries.d.ts +74 -11
- package/lib/chevre/repo/eventSeries.js +301 -45
- package/lib/chevre/repo/member.d.ts +4 -4
- package/lib/chevre/repo/member.js +0 -15
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +3 -3
- package/lib/chevre/repo/message.d.ts +30 -6
- package/lib/chevre/repo/message.js +25 -22
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.js +0 -3
- package/lib/chevre/repo/mongoose/schemas/civicStructure.d.ts +12 -0
- package/lib/chevre/repo/mongoose/schemas/civicStructure.js +131 -0
- package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/creativeWork.js +21 -23
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +1 -5
- package/lib/chevre/repo/mongoose/schemas/event.js +11 -78
- package/lib/chevre/repo/mongoose/schemas/eventSeries.d.ts +13 -0
- package/lib/chevre/repo/mongoose/schemas/eventSeries.js +219 -0
- package/lib/chevre/repo/mongoose/schemas/message.js +0 -3
- package/lib/chevre/repo/mongoose/schemas/note.js +0 -3
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.js +21 -23
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +1 -5
- package/lib/chevre/repo/mongoose/schemas/place.js +38 -42
- package/lib/chevre/repo/note.d.ts +27 -6
- package/lib/chevre/repo/note.js +25 -22
- package/lib/chevre/repo/offer.d.ts +8 -8
- package/lib/chevre/repo/offer.js +0 -21
- package/lib/chevre/repo/offerCatalog.d.ts +4 -4
- package/lib/chevre/repo/offerCatalogItem.d.ts +25 -1
- package/lib/chevre/repo/offerItemCondition.d.ts +28 -0
- package/lib/chevre/repo/offerItemCondition.js +8 -1
- package/lib/chevre/repo/order.d.ts +5 -5
- package/lib/chevre/repo/order.js +0 -73
- package/lib/chevre/repo/orderInTransaction.d.ts +27 -3
- package/lib/chevre/repo/ownershipInfo.d.ts +5 -5
- package/lib/chevre/repo/paymentService.d.ts +25 -1
- package/lib/chevre/repo/paymentServiceProvider.d.ts +26 -2
- package/lib/chevre/repo/place/busStop.d.ts +1 -1
- package/lib/chevre/repo/place/busStop.js +11 -11
- package/lib/chevre/repo/place/hasPOS.d.ts +1 -1
- package/lib/chevre/repo/place/hasPOS.js +7 -7
- package/lib/chevre/repo/place/movieTheater.d.ts +24 -53
- package/lib/chevre/repo/place/movieTheater.js +115 -140
- package/lib/chevre/repo/place/screeningRoom.d.ts +5 -0
- package/lib/chevre/repo/place/screeningRoom.js +67 -3
- package/lib/chevre/repo/place/seat.d.ts +1 -0
- package/lib/chevre/repo/place/seat.js +4 -1
- package/lib/chevre/repo/place/section.d.ts +1 -0
- package/lib/chevre/repo/place/section.js +4 -1
- package/lib/chevre/repo/priceSpecification.d.ts +4 -4
- package/lib/chevre/repo/priceSpecification.js +0 -1
- package/lib/chevre/repo/product.d.ts +4 -4
- package/lib/chevre/repo/productModel.d.ts +25 -1
- package/lib/chevre/repo/productOffer.d.ts +25 -1
- package/lib/chevre/repo/project.d.ts +5 -5
- package/lib/chevre/repo/project.js +0 -2
- package/lib/chevre/repo/reservation.d.ts +5 -5
- package/lib/chevre/repo/reservation.js +6 -59
- package/lib/chevre/repo/seller.d.ts +5 -5
- package/lib/chevre/repo/serviceOutput.d.ts +25 -1
- package/lib/chevre/repo/task.d.ts +8 -8
- package/lib/chevre/repo/transaction.d.ts +4 -4
- package/lib/chevre/repo/trip.d.ts +25 -1
- package/lib/chevre/service/aggregation/event/aggregateOffers.js +2 -2
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +3 -3
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +5 -4
- package/lib/chevre/service/assetTransaction/reserve/start.d.ts +2 -0
- package/lib/chevre/service/assetTransaction/reserve/start.js +1 -1
- package/lib/chevre/service/event/createEvent.js +4 -2
- package/lib/chevre/service/event.d.ts +6 -0
- package/lib/chevre/service/event.js +134 -49
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +2 -0
- package/lib/chevre/service/offer/event/authorize.d.ts +2 -0
- package/lib/chevre/service/offer/event/searchEventTicketOffers.d.ts +3 -0
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +10 -10
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +1 -1
- package/lib/chevre/service/offer/onEventChanged.d.ts +2 -0
- package/lib/chevre/service/offer/onEventChanged.js +22 -6
- package/lib/chevre/service/offer.js +1 -1
- package/lib/chevre/service/payment/movieTicket/checkMovieTicket.js +1 -1
- package/lib/chevre/service/payment/movieTicket/factory.js +0 -6
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +1 -1
- package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.js +0 -6
- package/lib/chevre/service/payment/movieTicket/validation.js +1 -1
- package/lib/chevre/service/report/telemetry.js +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +1 -1
- package/lib/chevre/service/task/importEventsFromCOA.js +2 -0
- package/lib/chevre/service/task/onEventChanged.js +2 -0
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +4 -2
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +2 -0
- package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +12 -7
- package/lib/chevre/service/task/onResourceUpdated.js +13 -11
- package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -1
- package/package.json +6 -6
- package/example/src/chevre/createManyEvents.ts +0 -75
- package/example/src/chevre/migrateAccountTitleCategoryAdditionalProperties.ts +0 -113
- package/example/src/chevre/migrateAccountTitleSetAdditionalProperties.ts +0 -120
- package/example/src/chevre/migrateMembers2.ts +0 -74
- package/example/src/chevre/playAroundMessage.ts +0 -73
- package/example/src/chevre/playAroundNote.ts +0 -34
- package/example/src/chevre/projectEventFields.ts +0 -39
- package/example/src/chevre/searchAvaialbleAppliesToMovieTicketByOfferCatalogId.ts +0 -45
- package/example/src/chevre/searchEventIds.ts +0 -24
- package/example/src/chevre/searchScreeningEventSeries.ts +0 -34
|
@@ -22,9 +22,25 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.CreativeWorkRepo = void 0;
|
|
24
24
|
const mongoose_1 = require("mongoose");
|
|
25
|
-
const creativeWork_1 = require("./mongoose/schemas/creativeWork");
|
|
26
25
|
const factory = require("../factory");
|
|
27
26
|
const settings_1 = require("../settings");
|
|
27
|
+
const creativeWork_1 = require("./mongoose/schemas/creativeWork");
|
|
28
|
+
const AVAILABLE_PROJECT_FIELDS = [
|
|
29
|
+
'project',
|
|
30
|
+
'typeOf',
|
|
31
|
+
'identifier',
|
|
32
|
+
'name',
|
|
33
|
+
'alternativeHeadline',
|
|
34
|
+
// 'description',
|
|
35
|
+
'datePublished',
|
|
36
|
+
'distributor',
|
|
37
|
+
'headline',
|
|
38
|
+
'thumbnailUrl',
|
|
39
|
+
'duration',
|
|
40
|
+
'contentRating',
|
|
41
|
+
'offers',
|
|
42
|
+
'additionalProperty'
|
|
43
|
+
];
|
|
28
44
|
/**
|
|
29
45
|
* コンテンツリポジトリ
|
|
30
46
|
*/
|
|
@@ -119,21 +135,24 @@ class CreativeWorkRepo {
|
|
|
119
135
|
*/
|
|
120
136
|
saveMovie(params) {
|
|
121
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
let savedId;
|
|
122
139
|
let doc;
|
|
123
|
-
if (params.id === '') {
|
|
124
|
-
const { $unset } = params, createParams = __rest(params, ["$unset"]);
|
|
140
|
+
if (typeof params.id !== 'string' || params.id === '') {
|
|
141
|
+
const { $unset, id } = params, createParams = __rest(params, ["$unset", "id"]); // omit id(2024-09-12~)
|
|
125
142
|
doc = yield this.creativeWorkModel.create(createParams);
|
|
143
|
+
savedId = doc.id;
|
|
126
144
|
}
|
|
127
145
|
else {
|
|
128
146
|
// 上書き禁止属性を除外
|
|
129
147
|
const { id, identifier, project, typeOf, $unset } = params, setFields = __rest(params, ["id", "identifier", "project", "typeOf", "$unset"]);
|
|
130
|
-
doc = yield this.creativeWorkModel.findOneAndUpdate({ _id: { $eq: params.id } }, Object.assign({ $set: setFields }, ($unset !== undefined) ? { $unset } : undefined), { upsert: false, new: true })
|
|
148
|
+
doc = yield this.creativeWorkModel.findOneAndUpdate({ _id: { $eq: params.id } }, Object.assign({ $set: setFields }, ($unset !== undefined) ? { $unset } : undefined), { upsert: false, new: true, projection: { _id: 1 } })
|
|
131
149
|
.exec();
|
|
150
|
+
savedId = params.id;
|
|
132
151
|
}
|
|
133
152
|
if (doc === null) {
|
|
134
153
|
throw new factory.errors.NotFound(this.creativeWorkModel.modelName);
|
|
135
154
|
}
|
|
136
|
-
return
|
|
155
|
+
return { id: savedId };
|
|
137
156
|
});
|
|
138
157
|
}
|
|
139
158
|
/**
|
|
@@ -209,28 +228,37 @@ class CreativeWorkRepo {
|
|
|
209
228
|
/**
|
|
210
229
|
* コンテンツを検索する
|
|
211
230
|
*/
|
|
212
|
-
|
|
231
|
+
projectFields(params, inclusion
|
|
232
|
+
// exclusion: IKeyOfProjection[]
|
|
233
|
+
) {
|
|
213
234
|
var _a;
|
|
214
235
|
return __awaiter(this, void 0, void 0, function* () {
|
|
215
236
|
const conditions = CreativeWorkRepo.CREATE_MONGO_CONDITIONS(params);
|
|
216
|
-
let projection = {};
|
|
237
|
+
// let projection: { [key: string]: number } = {};
|
|
238
|
+
// if (Array.isArray(inclusion) && inclusion.length > 0) {
|
|
239
|
+
// inclusion.forEach((field) => {
|
|
240
|
+
// projection[field] = 1;
|
|
241
|
+
// });
|
|
242
|
+
// } else {
|
|
243
|
+
// projection = {
|
|
244
|
+
// __v: 0,
|
|
245
|
+
// createdAt: 0,
|
|
246
|
+
// updatedAt: 0
|
|
247
|
+
// };
|
|
248
|
+
// if (Array.isArray(exclusion) && exclusion.length > 0) {
|
|
249
|
+
// exclusion.forEach((field) => {
|
|
250
|
+
// projection[field] = 0;
|
|
251
|
+
// });
|
|
252
|
+
// }
|
|
253
|
+
// }
|
|
254
|
+
let positiveProjectionFields = AVAILABLE_PROJECT_FIELDS;
|
|
217
255
|
if (Array.isArray(inclusion) && inclusion.length > 0) {
|
|
218
|
-
inclusion.
|
|
219
|
-
projection[field] = 1;
|
|
220
|
-
});
|
|
256
|
+
positiveProjectionFields = inclusion.filter((key) => AVAILABLE_PROJECT_FIELDS.includes(key));
|
|
221
257
|
}
|
|
222
258
|
else {
|
|
223
|
-
|
|
224
|
-
__v: 0,
|
|
225
|
-
createdAt: 0,
|
|
226
|
-
updatedAt: 0
|
|
227
|
-
};
|
|
228
|
-
if (Array.isArray(exclusion) && exclusion.length > 0) {
|
|
229
|
-
exclusion.forEach((field) => {
|
|
230
|
-
projection[field] = 0;
|
|
231
|
-
});
|
|
232
|
-
}
|
|
259
|
+
throw new factory.errors.ArgumentNull('inclusion', 'inclusion must be specified');
|
|
233
260
|
}
|
|
261
|
+
const projection = Object.assign({ _id: 0, id: { $toString: '$_id' } }, Object.fromEntries(positiveProjectionFields.map((key) => ([key, 1]))));
|
|
234
262
|
const query = this.creativeWorkModel.find({ $and: conditions }, projection);
|
|
235
263
|
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
236
264
|
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
@@ -243,8 +271,8 @@ class CreativeWorkRepo {
|
|
|
243
271
|
query.sort({ identifier: params.sort.identifier });
|
|
244
272
|
}
|
|
245
273
|
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
246
|
-
.
|
|
247
|
-
.
|
|
274
|
+
.lean() // 2024-09-19~
|
|
275
|
+
.exec();
|
|
248
276
|
});
|
|
249
277
|
}
|
|
250
278
|
/**
|
|
@@ -252,7 +280,7 @@ class CreativeWorkRepo {
|
|
|
252
280
|
*/
|
|
253
281
|
deleteMovie(params) {
|
|
254
282
|
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
-
yield this.creativeWorkModel.findOneAndRemove({ _id: { $eq: params.id } })
|
|
283
|
+
yield this.creativeWorkModel.findOneAndRemove({ _id: { $eq: params.id } }, { projection: { _id: 1 } })
|
|
256
284
|
.exec();
|
|
257
285
|
});
|
|
258
286
|
}
|
|
@@ -51,14 +51,14 @@ export declare class CustomerRepo {
|
|
|
51
51
|
deleteById(params: {
|
|
52
52
|
id: string;
|
|
53
53
|
}): Promise<void>;
|
|
54
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, factory.customer.ICustomer> &
|
|
54
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, {}, factory.customer.ICustomer> & factory.customer.ICustomer & {
|
|
55
55
|
_id: import("mongoose").Types.ObjectId;
|
|
56
|
-
},
|
|
56
|
+
}, import("mongoose").QueryOptions<import("mongoose").Document<unknown, {}, factory.customer.ICustomer> & factory.customer.ICustomer & {
|
|
57
57
|
_id: import("mongoose").Types.ObjectId;
|
|
58
|
-
}
|
|
58
|
+
}>>;
|
|
59
59
|
unsetUnnecessaryFields(params: {
|
|
60
60
|
filter: any;
|
|
61
61
|
$unset: any;
|
|
62
|
-
}): Promise<import("
|
|
62
|
+
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
63
63
|
}
|
|
64
64
|
export {};
|
|
@@ -26,7 +26,9 @@ import type { BulkWriteResult } from 'mongodb';
|
|
|
26
26
|
import type { Connection, Document, FilterQuery } from 'mongoose';
|
|
27
27
|
import * as factory from '../factory';
|
|
28
28
|
import * as EventFactory from '../factory/event';
|
|
29
|
-
|
|
29
|
+
import { IDocType } from './mongoose/schemas/event';
|
|
30
|
+
type AvailableEventType = factory.eventType.Event | factory.eventType.ScreeningEvent;
|
|
31
|
+
export interface IAttributes4patchUpdate<T extends AvailableEventType> {
|
|
30
32
|
typeOf: T;
|
|
31
33
|
eventStatus?: factory.eventStatusType;
|
|
32
34
|
}
|
|
@@ -45,7 +47,7 @@ export interface IUpdateAggregateReservationParams {
|
|
|
45
47
|
remainingAttendeeCapacity?: '';
|
|
46
48
|
};
|
|
47
49
|
}
|
|
48
|
-
export type ISearchConditions<T extends
|
|
50
|
+
export type ISearchConditions<T extends AvailableEventType> = factory.event.ISearchConditions<T>;
|
|
49
51
|
interface IAggregationByStatus {
|
|
50
52
|
eventCount: number;
|
|
51
53
|
reservationCount: number;
|
|
@@ -68,13 +70,13 @@ interface IAggregateEvent {
|
|
|
68
70
|
statuses: IStatus[];
|
|
69
71
|
}
|
|
70
72
|
export import IMinimizedIndividualEvent = EventFactory.IMinimizedIndividualEvent;
|
|
71
|
-
type IKeyOfProjection<T extends
|
|
73
|
+
type IKeyOfProjection<T extends AvailableEventType> = Exclude<keyof factory.event.IEvent<T>, 'id'> | 'aggregateEntranceGate' | 'aggregateOffer' | 'superEvent.location.id' | 'offers.itemOffered';
|
|
72
74
|
/**
|
|
73
75
|
* minimizedEvent検索時のprojection候補
|
|
74
76
|
* add(2024-07-18~)
|
|
75
77
|
*/
|
|
76
|
-
type IKeyOfProjection4minimizedEvent<T extends
|
|
77
|
-
type IUnset<T extends
|
|
78
|
+
type IKeyOfProjection4minimizedEvent<T extends AvailableEventType> = T extends factory.eventType.ScreeningEvent ? Exclude<keyof IMinimizedIndividualEvent<T>, 'additionalProperty' | 'id'> | 'superEvent.id' | 'location.branchCode' | 'superEvent.workPerformed.identifier' | 'superEvent.location.id' | 'offers.itemOffered' | 'offers.itemOffered.id' | 'offers.offeredThrough' | 'offers.unacceptedPaymentMethod' | 'offers.eligibleQuantity' : T extends factory.eventType.Event ? Exclude<keyof IMinimizedIndividualEvent<T>, 'additionalProperty' | 'id'> | 'superEvent.id' | 'location.branchCode' | 'superEvent.workPerformed.identifier' | 'superEvent.location.id' | 'offers.itemOffered' | 'offers.itemOffered.id' | 'offers.offeredThrough' | 'offers.unacceptedPaymentMethod' | 'offers.eligibleQuantity' : never;
|
|
79
|
+
type IUnset<T extends AvailableEventType> = {
|
|
78
80
|
[key in keyof factory.event.IEvent<T>]?: 1;
|
|
79
81
|
};
|
|
80
82
|
/**
|
|
@@ -83,24 +85,37 @@ type IUnset<T extends factory.eventType> = {
|
|
|
83
85
|
export declare class EventRepo {
|
|
84
86
|
private readonly eventModel;
|
|
85
87
|
constructor(connection: Connection);
|
|
86
|
-
static CREATE_MONGO_CONDITIONS<T extends
|
|
88
|
+
static CREATE_MONGO_CONDITIONS<T extends AvailableEventType>(conditions: ISearchConditions<T>): FilterQuery<factory.event.IEvent<T>>[];
|
|
87
89
|
/**
|
|
88
90
|
* 複数イベントを作成する
|
|
89
91
|
*/
|
|
90
|
-
|
|
92
|
+
createManyEvents<T extends AvailableEventType>(params: {
|
|
91
93
|
attributes: factory.event.IAttributes<T>[];
|
|
92
94
|
expectsNoContent: boolean;
|
|
93
95
|
}): Promise<string[] | void>;
|
|
94
96
|
/**
|
|
95
97
|
* 特定の追加特性をキーにして、存在しなければ作成する(複数対応)
|
|
96
|
-
*
|
|
98
|
+
* 施設コンテンツとルームは1つに限定
|
|
99
|
+
* 存在すれば、特定の属性のみ更新する
|
|
97
100
|
*/
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
upsertManyByAdditionalProperty(params: {
|
|
102
|
+
events: factory.event.IAttributes<factory.eventType.ScreeningEvent>[];
|
|
103
|
+
additionalPropertyFilter: {
|
|
101
104
|
name: string;
|
|
102
105
|
};
|
|
103
|
-
|
|
106
|
+
eventSeries: {
|
|
107
|
+
/**
|
|
108
|
+
* 施設コンテンツID
|
|
109
|
+
*/
|
|
110
|
+
id: string;
|
|
111
|
+
};
|
|
112
|
+
screeningRoom: {
|
|
113
|
+
/**
|
|
114
|
+
* ルームコード
|
|
115
|
+
*/
|
|
116
|
+
branchCode: string;
|
|
117
|
+
};
|
|
118
|
+
}): Promise<{
|
|
104
119
|
bulkWriteResult: BulkWriteResult;
|
|
105
120
|
modifiedEvents: {
|
|
106
121
|
id: string;
|
|
@@ -109,7 +124,7 @@ export declare class EventRepo {
|
|
|
109
124
|
/**
|
|
110
125
|
* イベント部分更新
|
|
111
126
|
*/
|
|
112
|
-
updatePartiallyById<T extends
|
|
127
|
+
updatePartiallyById<T extends AvailableEventType>(params: {
|
|
113
128
|
project: {
|
|
114
129
|
id: string;
|
|
115
130
|
};
|
|
@@ -119,7 +134,7 @@ export declare class EventRepo {
|
|
|
119
134
|
/**
|
|
120
135
|
* イベントを保管する
|
|
121
136
|
*/
|
|
122
|
-
|
|
137
|
+
saveEvent<T extends AvailableEventType>(params: {
|
|
123
138
|
id?: string;
|
|
124
139
|
attributes: factory.event.IAttributes<T>;
|
|
125
140
|
/**
|
|
@@ -130,7 +145,7 @@ export declare class EventRepo {
|
|
|
130
145
|
}): Promise<{
|
|
131
146
|
id: string;
|
|
132
147
|
}>;
|
|
133
|
-
|
|
148
|
+
saveManyEvents<T extends AvailableEventType>(params: {
|
|
134
149
|
id: string;
|
|
135
150
|
attributes: factory.event.IAttributes<T>;
|
|
136
151
|
$unset?: IUnset<T>;
|
|
@@ -145,12 +160,12 @@ export declare class EventRepo {
|
|
|
145
160
|
/**
|
|
146
161
|
* イベントを検索する(inclusion projection)
|
|
147
162
|
*/
|
|
148
|
-
|
|
163
|
+
projectEventFields<T extends AvailableEventType>(params: ISearchConditions<T>, inclusion: IKeyOfProjection<T>[]): Promise<Omit<factory.event.IEvent<T>, 'aggregateEntranceGate' | 'aggregateOffer'>[]>;
|
|
149
164
|
/**
|
|
150
165
|
* IDのみで検索する
|
|
151
166
|
* projectionなし
|
|
152
167
|
*/
|
|
153
|
-
findAnyEventById<T extends
|
|
168
|
+
findAnyEventById<T extends AvailableEventType>(params: {
|
|
154
169
|
id: {
|
|
155
170
|
$eq: string;
|
|
156
171
|
};
|
|
@@ -165,18 +180,18 @@ export declare class EventRepo {
|
|
|
165
180
|
};
|
|
166
181
|
};
|
|
167
182
|
}): Promise<Omit<factory.event.IEvent<T>, 'aggregateEntranceGate' | 'aggregateOffer'>>;
|
|
168
|
-
|
|
183
|
+
searchEventIds<T extends AvailableEventType>(params: ISearchConditions<T>): Promise<string[]>;
|
|
169
184
|
/**
|
|
170
185
|
* 特定イベントから指定フィールドのみ取得する
|
|
171
186
|
* イベント IDは必ず返ります
|
|
172
187
|
*/
|
|
173
|
-
|
|
188
|
+
projectEventFieldsById<T extends AvailableEventType>(params: {
|
|
174
189
|
id: string;
|
|
175
190
|
}, inclusion: IKeyOfProjection4minimizedEvent<T>[]): Promise<IMinimizedIndividualEvent<T>>;
|
|
176
191
|
/**
|
|
177
192
|
* イベントをキャンセルする
|
|
178
193
|
*/
|
|
179
|
-
|
|
194
|
+
cancelEvent(params: {
|
|
180
195
|
project: {
|
|
181
196
|
id: string;
|
|
182
197
|
};
|
|
@@ -189,23 +204,18 @@ export declare class EventRepo {
|
|
|
189
204
|
project: {
|
|
190
205
|
id: string;
|
|
191
206
|
};
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* 施設コンテンツID
|
|
195
|
-
*/
|
|
196
|
-
id: string;
|
|
197
|
-
};
|
|
207
|
+
superEventFromDB: Pick<factory.event.screeningEventSeries.IEvent, 'additionalProperty' | 'alternativeHeadline' | 'description' | 'dubLanguage' | 'endDate' | 'headline' | 'id' | 'kanaName' | 'location' | 'name' | 'soundFormat' | 'startDate' | 'subtitleLanguage' | 'typeOf' | 'videoFormat' | 'workPerformed'>;
|
|
198
208
|
startDate: {
|
|
199
209
|
$gte: Date;
|
|
200
210
|
};
|
|
201
211
|
}): Promise<void>;
|
|
202
|
-
|
|
212
|
+
deleteEventById(params: {
|
|
203
213
|
project: {
|
|
204
214
|
id: string;
|
|
205
215
|
};
|
|
206
216
|
id: string;
|
|
207
217
|
}): Promise<void>;
|
|
208
|
-
|
|
218
|
+
deleteManyEventByOrganizerId(params: {
|
|
209
219
|
project: {
|
|
210
220
|
id: string;
|
|
211
221
|
};
|
|
@@ -213,15 +223,7 @@ export declare class EventRepo {
|
|
|
213
223
|
id: string;
|
|
214
224
|
};
|
|
215
225
|
}): Promise<import("mongodb").DeleteResult>;
|
|
216
|
-
|
|
217
|
-
project: {
|
|
218
|
-
id: string;
|
|
219
|
-
};
|
|
220
|
-
location: {
|
|
221
|
-
id: string;
|
|
222
|
-
};
|
|
223
|
-
}): Promise<import("mongodb").DeleteResult>;
|
|
224
|
-
deleteManyByScreeningRoom(params: {
|
|
226
|
+
deleteManyEventsByScreeningRoom(params: {
|
|
225
227
|
project: {
|
|
226
228
|
id: string;
|
|
227
229
|
};
|
|
@@ -259,7 +261,7 @@ export declare class EventRepo {
|
|
|
259
261
|
/**
|
|
260
262
|
* 興行(プロダクト)から削除する
|
|
261
263
|
*/
|
|
262
|
-
|
|
264
|
+
deleteManyEventsByItemOfferedId(params: {
|
|
263
265
|
project: {
|
|
264
266
|
id: string;
|
|
265
267
|
};
|
|
@@ -271,21 +273,14 @@ export declare class EventRepo {
|
|
|
271
273
|
};
|
|
272
274
|
};
|
|
273
275
|
}): Promise<import("mongodb").DeleteResult>;
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
};
|
|
281
|
-
ids: string[];
|
|
282
|
-
endDate: {
|
|
283
|
-
$lte: Date;
|
|
284
|
-
};
|
|
285
|
-
}): Promise<import("mongodb").DeleteResult>;
|
|
286
|
-
deleteManyEndedByProject(params: {
|
|
276
|
+
/**
|
|
277
|
+
* 旧施設コンテンツ廃止専用メソッド
|
|
278
|
+
* 2024-09-11~
|
|
279
|
+
*/
|
|
280
|
+
deleteOldEventSeries(): Promise<import("mongodb").DeleteResult>;
|
|
281
|
+
deleteManyEventsEndedByProject(params: {
|
|
287
282
|
typeOf: {
|
|
288
|
-
$in:
|
|
283
|
+
$in: AvailableEventType[];
|
|
289
284
|
};
|
|
290
285
|
project: {
|
|
291
286
|
id: string;
|
|
@@ -294,9 +289,9 @@ export declare class EventRepo {
|
|
|
294
289
|
$lte: Date;
|
|
295
290
|
};
|
|
296
291
|
}): Promise<import("mongodb").DeleteResult>;
|
|
297
|
-
|
|
292
|
+
deleteManyEventsEnded(params: {
|
|
298
293
|
typeOf: {
|
|
299
|
-
$eq:
|
|
294
|
+
$eq: AvailableEventType;
|
|
300
295
|
};
|
|
301
296
|
endDate: {
|
|
302
297
|
$lte: Date;
|
|
@@ -318,35 +313,25 @@ export declare class EventRepo {
|
|
|
318
313
|
validationErrors: import("mongoose").Error[];
|
|
319
314
|
} | undefined;
|
|
320
315
|
}>;
|
|
321
|
-
getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<Document<unknown, {},
|
|
316
|
+
getCursor(conditions: FilterQuery<any>, projection: any): import("mongoose").Cursor<Document<unknown, {}, IDocType> & ((import("@chevre/factory/lib/event/anyEvent").IAttributes & {
|
|
322
317
|
_id: string;
|
|
323
318
|
} & Required<{
|
|
324
319
|
_id: string;
|
|
325
320
|
}>) | (import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
|
|
326
321
|
_id: string;
|
|
327
|
-
alternateName?: any;
|
|
328
322
|
aggregateOffer?: import("@chevre/factory/lib/event/anyEvent").IAggregateOffer | undefined;
|
|
329
323
|
} & Required<{
|
|
330
324
|
_id: string;
|
|
331
|
-
}>)
|
|
332
|
-
_id: string;
|
|
333
|
-
} & Required<{
|
|
334
|
-
_id: string;
|
|
335
|
-
}>), never>, import("mongoose").QueryOptions<Document<unknown, {}, import("./mongoose/schemas/event").IDocType> & Omit<(import("@chevre/factory/lib/event/anyEvent").IAttributes & {
|
|
325
|
+
}>)), import("mongoose").QueryOptions<Document<unknown, {}, IDocType> & ((import("@chevre/factory/lib/event/anyEvent").IAttributes & {
|
|
336
326
|
_id: string;
|
|
337
327
|
} & Required<{
|
|
338
328
|
_id: string;
|
|
339
329
|
}>) | (import("@chevre/factory/lib/event/screeningEvent").IAttributes & {
|
|
340
330
|
_id: string;
|
|
341
|
-
alternateName?: any;
|
|
342
331
|
aggregateOffer?: import("@chevre/factory/lib/event/anyEvent").IAggregateOffer | undefined;
|
|
343
332
|
} & Required<{
|
|
344
333
|
_id: string;
|
|
345
|
-
}>)
|
|
346
|
-
_id: string;
|
|
347
|
-
} & Required<{
|
|
348
|
-
_id: string;
|
|
349
|
-
}>), never>>>;
|
|
334
|
+
}>))>>;
|
|
350
335
|
addAvailableAtOrFrom(params: {
|
|
351
336
|
id: string;
|
|
352
337
|
offers: {
|
|
@@ -355,22 +340,10 @@ export declare class EventRepo {
|
|
|
355
340
|
};
|
|
356
341
|
};
|
|
357
342
|
}): Promise<void>;
|
|
358
|
-
|
|
359
|
-
id: string;
|
|
360
|
-
offers: {
|
|
361
|
-
seller: {
|
|
362
|
-
makesOffer: {
|
|
363
|
-
availableAtOrFrom: {
|
|
364
|
-
id: string;
|
|
365
|
-
};
|
|
366
|
-
};
|
|
367
|
-
};
|
|
368
|
-
};
|
|
369
|
-
}): Promise<void>;
|
|
370
|
-
unsetUnnecessaryFields<T extends factory.eventType>(params: {
|
|
343
|
+
unsetUnnecessaryFields<T extends AvailableEventType>(params: {
|
|
371
344
|
filter: FilterQuery<factory.event.IEvent<T>>;
|
|
372
345
|
$unset: IUnset<T>;
|
|
373
|
-
}): Promise<import("
|
|
346
|
+
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
374
347
|
aggregateEvent(params: {
|
|
375
348
|
project?: {
|
|
376
349
|
id?: {
|
|
@@ -379,7 +352,7 @@ export declare class EventRepo {
|
|
|
379
352
|
};
|
|
380
353
|
startFrom: Date;
|
|
381
354
|
startThrough: Date;
|
|
382
|
-
typeOf:
|
|
355
|
+
typeOf: AvailableEventType;
|
|
383
356
|
}): Promise<IAggregateEvent>;
|
|
384
357
|
private agggregateByStatus;
|
|
385
358
|
}
|