@chevre/domain 28.0.0-alpha.4 → 28.0.0-alpha.40
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.js +1 -1
- 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/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 +2 -8
- package/lib/chevre/repo/project.js +0 -12
- 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.d.ts +1 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +0 -5
- 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.js +0 -5
- package/lib/chevre/service/transaction/returnOrder/preStart/factory.d.ts +1 -1
- package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -2
- 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,30 +1,32 @@
|
|
|
1
1
|
import type { Connection, FilterQuery } from 'mongoose';
|
|
2
2
|
import { factory } from '../factory';
|
|
3
|
+
import { IDocType } from './mongoose/schemas/paymentServiceChannel';
|
|
3
4
|
export type ISavingChannel = Pick<factory.serviceChannel.IServiceChannel, 'credentials' | 'project' | 'providesService' | 'serviceUrl' | 'typeOf'> & {
|
|
4
5
|
id?: never;
|
|
5
6
|
};
|
|
6
|
-
interface IUnset {
|
|
7
|
-
$unset?: Record<string, 1>;
|
|
8
|
-
}
|
|
9
7
|
type IServiceChannelWithId = factory.serviceChannel.IServiceChannel & {
|
|
10
8
|
id: string;
|
|
11
9
|
};
|
|
12
|
-
type IKeyOfProjection = keyof
|
|
10
|
+
type IKeyOfProjection = keyof IDocType;
|
|
13
11
|
/**
|
|
14
|
-
*
|
|
12
|
+
* 決済サービスチャネル管理リポジトリ
|
|
15
13
|
*/
|
|
16
|
-
export declare class
|
|
14
|
+
export declare class AdminPaymentServiceChannelRepo {
|
|
17
15
|
private readonly paymentServiceChannelModel;
|
|
18
16
|
constructor(connection: Connection);
|
|
19
|
-
static CREATE_MONGO_CONDITIONS(params: factory.serviceChannel.ISearchConditions): FilterQuery<
|
|
20
|
-
|
|
17
|
+
static CREATE_MONGO_CONDITIONS(params: factory.serviceChannel.ISearchConditions): FilterQuery<IDocType>[];
|
|
18
|
+
/**
|
|
19
|
+
* 決済サービスチャネル保管
|
|
20
|
+
* 編集の場合、credentialsのみ変更可能
|
|
21
|
+
*/
|
|
22
|
+
savePaymentServiceChannel(params: {
|
|
21
23
|
id?: string;
|
|
22
|
-
attributes: ISavingChannel
|
|
24
|
+
attributes: ISavingChannel;
|
|
23
25
|
}): Promise<{
|
|
24
26
|
id: string;
|
|
25
27
|
}>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
findPaymentServiceChannels(conditions: factory.serviceChannel.ISearchConditions, inclusion: IKeyOfProjection[]): Promise<IServiceChannelWithId[]>;
|
|
29
|
+
deletePaymentServiceChannelById(params: {
|
|
28
30
|
id: string;
|
|
29
31
|
project: {
|
|
30
32
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.AdminPaymentServiceChannelRepo = void 0;
|
|
4
4
|
const factory_1 = require("../factory");
|
|
5
5
|
const settings_1 = require("../settings");
|
|
6
6
|
const paymentServiceChannel_1 = require("./mongoose/schemas/paymentServiceChannel");
|
|
@@ -10,12 +10,11 @@ const AVAILABLE_PROJECT_FIELDS = [
|
|
|
10
10
|
'credentials',
|
|
11
11
|
'providesService',
|
|
12
12
|
'serviceUrl',
|
|
13
|
-
'typeOf'
|
|
14
13
|
];
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
15
|
+
* 決済サービスチャネル管理リポジトリ
|
|
17
16
|
*/
|
|
18
|
-
class
|
|
17
|
+
class AdminPaymentServiceChannelRepo {
|
|
19
18
|
paymentServiceChannelModel;
|
|
20
19
|
constructor(connection) {
|
|
21
20
|
this.paymentServiceChannelModel = connection.model(paymentServiceChannel_1.modelName, (0, paymentServiceChannel_1.createSchema)());
|
|
@@ -44,29 +43,31 @@ class PaymentServiceChannelRepo {
|
|
|
44
43
|
}
|
|
45
44
|
return andConditions;
|
|
46
45
|
}
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
/**
|
|
47
|
+
* 決済サービスチャネル保管
|
|
48
|
+
* 編集の場合、credentialsのみ変更可能
|
|
49
|
+
*/
|
|
50
|
+
async savePaymentServiceChannel(params) {
|
|
49
51
|
let savedId;
|
|
50
52
|
const savingId = params.id;
|
|
51
53
|
if (typeof savingId === 'string') {
|
|
52
54
|
if (savingId === '') {
|
|
53
55
|
throw new factory_1.factory.errors.ArgumentNull('id');
|
|
54
56
|
}
|
|
55
|
-
const {
|
|
57
|
+
const { credentials, project } = params.attributes;
|
|
56
58
|
const filter = {
|
|
57
59
|
_id: { $eq: savingId },
|
|
58
60
|
'project.id': { $eq: project.id }
|
|
59
61
|
};
|
|
60
62
|
const update = {
|
|
61
|
-
$set:
|
|
62
|
-
...($unset !== undefined && $unset !== null) ? { $unset } : undefined
|
|
63
|
+
$set: { credentials },
|
|
63
64
|
};
|
|
64
65
|
const options = {
|
|
65
66
|
upsert: false,
|
|
66
67
|
new: true,
|
|
67
|
-
projection: { _id:
|
|
68
|
+
projection: { _id: 0, id: { $toString: '$_id' } }
|
|
68
69
|
};
|
|
69
|
-
doc = await this.paymentServiceChannelModel.findOneAndUpdate(filter, update, options)
|
|
70
|
+
const doc = await this.paymentServiceChannelModel.findOneAndUpdate(filter, update, options)
|
|
70
71
|
.lean()
|
|
71
72
|
.exec();
|
|
72
73
|
if (doc === null) {
|
|
@@ -75,8 +76,8 @@ class PaymentServiceChannelRepo {
|
|
|
75
76
|
savedId = savingId;
|
|
76
77
|
}
|
|
77
78
|
else {
|
|
78
|
-
const {
|
|
79
|
-
const result = await this.paymentServiceChannelModel.insertMany(
|
|
79
|
+
const { credentials, project, providesService, serviceUrl, typeOf } = params.attributes;
|
|
80
|
+
const result = await this.paymentServiceChannelModel.insertMany({ credentials, project, providesService, serviceUrl, typeOf }, { rawResult: true });
|
|
80
81
|
const insertedId = result.insertedIds?.[0]?.toHexString();
|
|
81
82
|
if (typeof insertedId !== 'string') {
|
|
82
83
|
throw new factory_1.factory.errors.Internal(`not saved unexpectedly. result:${JSON.stringify(result)}`);
|
|
@@ -85,8 +86,8 @@ class PaymentServiceChannelRepo {
|
|
|
85
86
|
}
|
|
86
87
|
return { id: savedId };
|
|
87
88
|
}
|
|
88
|
-
async
|
|
89
|
-
const andConditions =
|
|
89
|
+
async findPaymentServiceChannels(conditions, inclusion) {
|
|
90
|
+
const andConditions = AdminPaymentServiceChannelRepo.CREATE_MONGO_CONDITIONS(conditions);
|
|
90
91
|
let positiveProjectionFields = AVAILABLE_PROJECT_FIELDS;
|
|
91
92
|
if (Array.isArray(inclusion) && inclusion.length > 0) {
|
|
92
93
|
positiveProjectionFields = inclusion.filter((key) => AVAILABLE_PROJECT_FIELDS.includes(key));
|
|
@@ -109,11 +110,11 @@ class PaymentServiceChannelRepo {
|
|
|
109
110
|
.lean()
|
|
110
111
|
.exec();
|
|
111
112
|
}
|
|
112
|
-
async
|
|
113
|
-
await this.paymentServiceChannelModel.
|
|
113
|
+
async deletePaymentServiceChannelById(params) {
|
|
114
|
+
await this.paymentServiceChannelModel.deleteOne({
|
|
114
115
|
_id: { $eq: params.id },
|
|
115
116
|
'project.id': { $eq: params.project.id }
|
|
116
|
-
}
|
|
117
|
+
})
|
|
117
118
|
.exec();
|
|
118
119
|
}
|
|
119
120
|
async unsetUnnecessaryFields(params) {
|
|
@@ -121,4 +122,4 @@ class PaymentServiceChannelRepo {
|
|
|
121
122
|
.exec();
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
|
-
exports.
|
|
125
|
+
exports.AdminPaymentServiceChannelRepo = AdminPaymentServiceChannelRepo;
|
|
@@ -33,13 +33,13 @@ export declare class AdminTaskRepo {
|
|
|
33
33
|
}): Promise<{
|
|
34
34
|
count: number;
|
|
35
35
|
}>;
|
|
36
|
-
getCursor(conditions: FilterQuery<factory.task.ITask<factory.taskName>>, projection: ProjectionType<factory.task.ITask<factory.taskName>>): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask, "
|
|
36
|
+
getCursor(conditions: FilterQuery<factory.task.ITask<factory.taskName>>, projection: ProjectionType<factory.task.ITask<factory.taskName>>): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask, "identifier" | "name" | "description" | "project" | "data" | "status" | "runsAt" | "dateAborted" | "executionResults" | "executor" | "lastTriedAt" | "remainingNumberOfTries" | "numberOfTried"> & {
|
|
37
37
|
expires?: never;
|
|
38
38
|
} & {
|
|
39
39
|
_id: import("mongoose").Types.ObjectId;
|
|
40
40
|
} & {
|
|
41
41
|
__v: number;
|
|
42
|
-
}, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask, "
|
|
42
|
+
}, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Pick<import("@chevre/factory/lib/chevre/task").ITask | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/createAccountingReport").ITask | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").ITask | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").ITask | import("@chevre/factory/lib/chevre/task/onEventChanged").ITask | import("@chevre/factory/lib/chevre/task/onResourceDeleted").ITask | import("@chevre/factory/lib/chevre/task/onResourceUpdated").ITask | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").ITask | import("@chevre/factory/lib/chevre/task/placeOrder").ITask | import("@chevre/factory/lib/chevre/task/returnOrder").ITask | import("@chevre/factory/lib/chevre/task/returnPayTransaction").ITask | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/chevre/task/sendEmailMessage").ITask | import("@chevre/factory/lib/chevre/task/sendOrder").ITask | import("@chevre/factory/lib/chevre/task/triggerWebhook").ITask | import("@chevre/factory/lib/chevre/task/useReservation").ITask | import("@chevre/factory/lib/chevre/task/voidPayTransaction").ITask, "identifier" | "name" | "description" | "project" | "data" | "status" | "runsAt" | "dateAborted" | "executionResults" | "executor" | "lastTriedAt" | "remainingNumberOfTries" | "numberOfTried"> & {
|
|
43
43
|
expires?: never;
|
|
44
44
|
} & {
|
|
45
45
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -52,83 +52,73 @@ export declare class AdminTransactionRepo {
|
|
|
52
52
|
}): Promise<import("mongoose").UpdateWriteOpResult>;
|
|
53
53
|
getCursor(conditions: any, projection: any, sort?: factory.sortType): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, {
|
|
54
54
|
object: import("@chevre/factory/lib/chevre/transaction/placeOrder").IObject;
|
|
55
|
-
|
|
55
|
+
endDate?: Date | undefined;
|
|
56
|
+
startDate: Date;
|
|
57
|
+
typeOf: factory.transactionType.PlaceOrder;
|
|
56
58
|
project: import("@chevre/factory/lib/chevre/transaction").IProject;
|
|
57
59
|
seller: import("@chevre/factory/lib/chevre/transaction/placeOrder").ISeller;
|
|
58
|
-
typeOf: factory.transactionType.PlaceOrder;
|
|
59
60
|
expires: Date;
|
|
60
61
|
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
61
|
-
startDate: Date;
|
|
62
|
-
endDate?: Date | undefined;
|
|
63
62
|
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
64
63
|
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
65
64
|
status: factory.transactionStatusType;
|
|
66
|
-
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
67
|
-
potentialActions?: undefined;
|
|
65
|
+
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction/placeOrder").ITasksExportAction | undefined;
|
|
68
66
|
}, import("./mongoose/virtuals").IVirtuals, {}> & {
|
|
69
67
|
object: import("@chevre/factory/lib/chevre/transaction/placeOrder").IObject;
|
|
70
|
-
|
|
68
|
+
endDate?: Date | undefined;
|
|
69
|
+
startDate: Date;
|
|
70
|
+
typeOf: factory.transactionType.PlaceOrder;
|
|
71
71
|
project: import("@chevre/factory/lib/chevre/transaction").IProject;
|
|
72
72
|
seller: import("@chevre/factory/lib/chevre/transaction/placeOrder").ISeller;
|
|
73
|
-
typeOf: factory.transactionType.PlaceOrder;
|
|
74
73
|
expires: Date;
|
|
75
74
|
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
76
|
-
startDate: Date;
|
|
77
|
-
endDate?: Date | undefined;
|
|
78
75
|
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
79
76
|
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
80
77
|
status: factory.transactionStatusType;
|
|
81
|
-
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
82
|
-
potentialActions?: undefined;
|
|
78
|
+
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction/placeOrder").ITasksExportAction | undefined;
|
|
83
79
|
} & {
|
|
84
80
|
_id: import("mongoose").Types.ObjectId;
|
|
85
81
|
} & {
|
|
86
82
|
__v: number;
|
|
87
83
|
}, import("mongoose").QueryOptions<{
|
|
88
84
|
object: import("@chevre/factory/lib/chevre/transaction/placeOrder").IObject;
|
|
89
|
-
|
|
85
|
+
endDate?: Date | undefined;
|
|
86
|
+
startDate: Date;
|
|
87
|
+
typeOf: factory.transactionType.PlaceOrder;
|
|
90
88
|
project: import("@chevre/factory/lib/chevre/transaction").IProject;
|
|
91
89
|
seller: import("@chevre/factory/lib/chevre/transaction/placeOrder").ISeller;
|
|
92
|
-
typeOf: factory.transactionType.PlaceOrder;
|
|
93
90
|
expires: Date;
|
|
94
91
|
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
95
|
-
startDate: Date;
|
|
96
|
-
endDate?: Date | undefined;
|
|
97
92
|
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
98
93
|
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
99
94
|
status: factory.transactionStatusType;
|
|
100
|
-
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
101
|
-
potentialActions?: undefined;
|
|
95
|
+
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction/placeOrder").ITasksExportAction | undefined;
|
|
102
96
|
}>, (import("mongoose").Document<unknown, Record<string, never>, {
|
|
103
97
|
object: import("@chevre/factory/lib/chevre/transaction/placeOrder").IObject;
|
|
104
|
-
|
|
98
|
+
endDate?: Date | undefined;
|
|
99
|
+
startDate: Date;
|
|
100
|
+
typeOf: factory.transactionType.PlaceOrder;
|
|
105
101
|
project: import("@chevre/factory/lib/chevre/transaction").IProject;
|
|
106
102
|
seller: import("@chevre/factory/lib/chevre/transaction/placeOrder").ISeller;
|
|
107
|
-
typeOf: factory.transactionType.PlaceOrder;
|
|
108
103
|
expires: Date;
|
|
109
104
|
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
110
|
-
startDate: Date;
|
|
111
|
-
endDate?: Date | undefined;
|
|
112
105
|
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
113
106
|
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
114
107
|
status: factory.transactionStatusType;
|
|
115
|
-
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
116
|
-
potentialActions?: undefined;
|
|
108
|
+
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction/placeOrder").ITasksExportAction | undefined;
|
|
117
109
|
}, import("./mongoose/virtuals").IVirtuals, {}> & {
|
|
118
110
|
object: import("@chevre/factory/lib/chevre/transaction/placeOrder").IObject;
|
|
119
|
-
|
|
111
|
+
endDate?: Date | undefined;
|
|
112
|
+
startDate: Date;
|
|
113
|
+
typeOf: factory.transactionType.PlaceOrder;
|
|
120
114
|
project: import("@chevre/factory/lib/chevre/transaction").IProject;
|
|
121
115
|
seller: import("@chevre/factory/lib/chevre/transaction/placeOrder").ISeller;
|
|
122
|
-
typeOf: factory.transactionType.PlaceOrder;
|
|
123
116
|
expires: Date;
|
|
124
117
|
result?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IResult | undefined;
|
|
125
|
-
startDate: Date;
|
|
126
|
-
endDate?: Date | undefined;
|
|
127
118
|
instrument?: import("@chevre/factory/lib/chevre/transaction/placeOrder").IInstrument | undefined;
|
|
128
119
|
agent: import("@chevre/factory/lib/chevre/transaction/placeOrder").IAgent;
|
|
129
120
|
status: factory.transactionStatusType;
|
|
130
|
-
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction").ITasksExportAction | undefined;
|
|
131
|
-
potentialActions?: undefined;
|
|
121
|
+
tasksExportAction?: import("@chevre/factory/lib/chevre/transaction/placeOrder").ITasksExportAction | undefined;
|
|
132
122
|
} & {
|
|
133
123
|
_id: import("mongoose").Types.ObjectId;
|
|
134
124
|
} & {
|
|
@@ -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 } }
|
|
@@ -17,28 +17,7 @@ class CategoryCodeRepo {
|
|
|
17
17
|
this.categoryCodeModel = connection.model(categoryCode_1.modelName, (0, categoryCode_1.createSchema)());
|
|
18
18
|
}
|
|
19
19
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
20
|
-
// const excludeMovieTicketType = true;
|
|
21
20
|
const andConditions = [];
|
|
22
|
-
// 決済カード区分をmovieTicketTypesへ移行済なので、excludeMovieTicketTypeオプションは不要(2025-11-07~)
|
|
23
|
-
// if (excludeMovieTicketType) {
|
|
24
|
-
// andConditions.push({
|
|
25
|
-
// 'inCodeSet.identifier': {
|
|
26
|
-
// $in: [
|
|
27
|
-
// factory.categoryCode.CategorySetIdentifier.ContentRatingType,
|
|
28
|
-
// factory.categoryCode.CategorySetIdentifier.CurrencyType,
|
|
29
|
-
// factory.categoryCode.CategorySetIdentifier.CustomerType,
|
|
30
|
-
// factory.categoryCode.CategorySetIdentifier.DistributorType,
|
|
31
|
-
// factory.categoryCode.CategorySetIdentifier.MembershipType,
|
|
32
|
-
// factory.categoryCode.CategorySetIdentifier.OfferCategoryType,
|
|
33
|
-
// factory.categoryCode.CategorySetIdentifier.PaymentMethodType,
|
|
34
|
-
// factory.categoryCode.CategorySetIdentifier.SeatingType,
|
|
35
|
-
// factory.categoryCode.CategorySetIdentifier.ServiceType,
|
|
36
|
-
// factory.categoryCode.CategorySetIdentifier.SoundFormatType,
|
|
37
|
-
// factory.categoryCode.CategorySetIdentifier.VideoFormatType
|
|
38
|
-
// ]
|
|
39
|
-
// }
|
|
40
|
-
// });
|
|
41
|
-
// }
|
|
42
21
|
/* istanbul ignore else */
|
|
43
22
|
if (params.project !== undefined && params.project !== null) {
|
|
44
23
|
if (params.project.id !== undefined && params.project.id !== null) {
|
|
@@ -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
|