@chevre/domain 21.2.0-alpha.79 → 21.2.0-alpha.80
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.
|
@@ -23,7 +23,7 @@ class MongoRepository {
|
|
|
23
23
|
}
|
|
24
24
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
25
25
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14;
|
|
27
27
|
const andConditions = [
|
|
28
28
|
{
|
|
29
29
|
typeOf: params.typeOf
|
|
@@ -175,7 +175,16 @@ class MongoRepository {
|
|
|
175
175
|
case factory.assetTransactionType.CancelReservation:
|
|
176
176
|
break;
|
|
177
177
|
case factory.assetTransactionType.Reserve:
|
|
178
|
-
const
|
|
178
|
+
const objectReservationForIdEq = (_y = (_x = (_w = params.object) === null || _w === void 0 ? void 0 : _w.reservationFor) === null || _x === void 0 ? void 0 : _x.id) === null || _y === void 0 ? void 0 : _y.$eq;
|
|
179
|
+
if (typeof objectReservationForIdEq === 'string') {
|
|
180
|
+
andConditions.push({
|
|
181
|
+
'object.reservationFor.id': {
|
|
182
|
+
$exists: true,
|
|
183
|
+
$eq: objectReservationForIdEq
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
const objectReservationNumberEq = (_0 = (_z = params.object) === null || _z === void 0 ? void 0 : _z.reservationNumber) === null || _0 === void 0 ? void 0 : _0.$eq;
|
|
179
188
|
if (typeof objectReservationNumberEq === 'string') {
|
|
180
189
|
andConditions.push({
|
|
181
190
|
'object.reservationNumber': {
|
|
@@ -184,19 +193,17 @@ class MongoRepository {
|
|
|
184
193
|
}
|
|
185
194
|
});
|
|
186
195
|
}
|
|
196
|
+
const objectSubReservationIdIn = (_3 = (_2 = (_1 = params.object) === null || _1 === void 0 ? void 0 : _1.reservations) === null || _2 === void 0 ? void 0 : _2.id) === null || _3 === void 0 ? void 0 : _3.$in;
|
|
197
|
+
if (Array.isArray(objectSubReservationIdIn)) {
|
|
198
|
+
andConditions.push({
|
|
199
|
+
'object.subReservation.id': {
|
|
200
|
+
$exists: true,
|
|
201
|
+
$in: objectSubReservationIdIn
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
187
205
|
if (params.object !== undefined) {
|
|
188
206
|
if (params.object.reservations !== undefined) {
|
|
189
|
-
if (params.object.reservations.id !== undefined) {
|
|
190
|
-
if (Array.isArray(params.object.reservations.id.$in)) {
|
|
191
|
-
andConditions.push({
|
|
192
|
-
// 'object.reservations.id': {
|
|
193
|
-
'object.subReservation.id': {
|
|
194
|
-
$exists: true,
|
|
195
|
-
$in: params.object.reservations.id.$in
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
207
|
if (params.object.reservations.reservationNumber !== undefined) {
|
|
201
208
|
if (Array.isArray(params.object.reservations.reservationNumber.$in)) {
|
|
202
209
|
andConditions.push({
|
|
@@ -221,9 +228,18 @@ class MongoRepository {
|
|
|
221
228
|
}
|
|
222
229
|
}
|
|
223
230
|
}
|
|
231
|
+
const objectUnderNameIdEq = (_6 = (_5 = (_4 = params.object) === null || _4 === void 0 ? void 0 : _4.underName) === null || _5 === void 0 ? void 0 : _5.id) === null || _6 === void 0 ? void 0 : _6.$eq;
|
|
232
|
+
if (typeof objectUnderNameIdEq === 'string') {
|
|
233
|
+
andConditions.push({
|
|
234
|
+
'object.underName.id': {
|
|
235
|
+
$exists: true,
|
|
236
|
+
$eq: objectUnderNameIdEq
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
}
|
|
224
240
|
break;
|
|
225
241
|
case factory.assetTransactionType.RegisterService:
|
|
226
|
-
const objectItemOfferedServiceOutputIdentifierEq = (
|
|
242
|
+
const objectItemOfferedServiceOutputIdentifierEq = (_10 = (_9 = (_8 = (_7 = params.object) === null || _7 === void 0 ? void 0 : _7.itemOffered) === null || _8 === void 0 ? void 0 : _8.serviceOutput) === null || _9 === void 0 ? void 0 : _9.identifier) === null || _10 === void 0 ? void 0 : _10.$eq;
|
|
227
243
|
if (typeof objectItemOfferedServiceOutputIdentifierEq === 'string') {
|
|
228
244
|
andConditions.push({
|
|
229
245
|
'object.itemOffered.serviceOutput.identifier': {
|
|
@@ -232,7 +248,7 @@ class MongoRepository {
|
|
|
232
248
|
}
|
|
233
249
|
});
|
|
234
250
|
}
|
|
235
|
-
const objectItemOfferedServiceOutputIdentifierIn = (
|
|
251
|
+
const objectItemOfferedServiceOutputIdentifierIn = (_14 = (_13 = (_12 = (_11 = params.object) === null || _11 === void 0 ? void 0 : _11.itemOffered) === null || _12 === void 0 ? void 0 : _12.serviceOutput) === null || _13 === void 0 ? void 0 : _13.identifier) === null || _14 === void 0 ? void 0 : _14.$in;
|
|
236
252
|
if (Array.isArray(objectItemOfferedServiceOutputIdentifierIn)) {
|
|
237
253
|
andConditions.push({
|
|
238
254
|
'object.itemOffered.serviceOutput.identifier': {
|
|
@@ -99,24 +99,6 @@ schema.index({ 'object.paymentMethodId': 1, startDate: -1 }, {
|
|
|
99
99
|
'object.paymentMethodId': { $exists: true }
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
-
schema.index({ 'object.reservations.id': 1, startDate: -1 }, {
|
|
103
|
-
name: 'searchByObjectReservationsId',
|
|
104
|
-
partialFilterExpression: {
|
|
105
|
-
'object.reservations.id': { $exists: true }
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
schema.index({ 'object.reservations.reservationNumber': 1, startDate: -1 }, {
|
|
109
|
-
name: 'searchByObjectReservationsReservationNumber',
|
|
110
|
-
partialFilterExpression: {
|
|
111
|
-
'object.reservations.reservationNumber': { $exists: true }
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
schema.index({ 'object.reservations.reservationFor.id': 1, startDate: -1 }, {
|
|
115
|
-
name: 'searchByObjectReservationsReservationForId',
|
|
116
|
-
partialFilterExpression: {
|
|
117
|
-
'object.reservations.reservationFor.id': { $exists: true }
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
102
|
schema.index({ 'object.subReservation.id': 1, startDate: -1 }, {
|
|
121
103
|
name: 'searchByObjectSubReservationsId',
|
|
122
104
|
partialFilterExpression: {
|
|
@@ -135,6 +117,18 @@ schema.index({ 'object.subReservation.reservationFor.id': 1, startDate: -1 }, {
|
|
|
135
117
|
'object.subReservation.reservationFor.id': { $exists: true }
|
|
136
118
|
}
|
|
137
119
|
});
|
|
120
|
+
schema.index({ 'object.reservationFor.id': 1, startDate: -1 }, {
|
|
121
|
+
name: 'searchByObjectReservationForId',
|
|
122
|
+
partialFilterExpression: {
|
|
123
|
+
'object.reservationFor.id': { $exists: true }
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
schema.index({ 'object.underName.id': 1, startDate: -1 }, {
|
|
127
|
+
name: 'searchByObjectUnderNameId',
|
|
128
|
+
partialFilterExpression: {
|
|
129
|
+
'object.underName.id': { $exists: true }
|
|
130
|
+
}
|
|
131
|
+
});
|
|
138
132
|
schema.index({ 'object.reservationNumber': 1, startDate: -1 }, {
|
|
139
133
|
name: 'searchByObjectReservationNumber',
|
|
140
134
|
partialFilterExpression: {
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.313.0-alpha.
|
|
13
|
-
"@cinerino/sdk": "3.157.0-alpha.
|
|
12
|
+
"@chevre/factory": "4.313.0-alpha.19",
|
|
13
|
+
"@cinerino/sdk": "3.157.0-alpha.5",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
16
16
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"postversion": "git push origin --tags",
|
|
118
118
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
119
119
|
},
|
|
120
|
-
"version": "21.2.0-alpha.
|
|
120
|
+
"version": "21.2.0-alpha.80"
|
|
121
121
|
}
|