@chevre/domain 20.14.0-alpha.4 → 21.0.0-alpha.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/ownershipInfosCsv2peopleJson.ts +1 -2
- package/example/src/chevre/saveTasks.ts +38 -0
- package/lib/chevre/repo/account.d.ts +1 -1
- package/lib/chevre/repo/account.js +5 -6
- package/lib/chevre/repo/accountTitle.d.ts +25 -1
- package/lib/chevre/repo/accountTransaction.js +3 -2
- package/lib/chevre/repo/action.js +9 -6
- package/lib/chevre/repo/assetTransaction.d.ts +25 -1
- package/lib/chevre/repo/assetTransaction.js +3 -2
- package/lib/chevre/repo/categoryCode.d.ts +25 -1
- package/lib/chevre/repo/code.js +3 -2
- package/lib/chevre/repo/comment.d.ts +25 -1
- package/lib/chevre/repo/comment.js +3 -2
- package/lib/chevre/repo/creativeWork.d.ts +29 -3
- package/lib/chevre/repo/creativeWork.js +3 -2
- package/lib/chevre/repo/customer.d.ts +25 -1
- package/lib/chevre/repo/customer.js +3 -2
- package/lib/chevre/repo/emailMessage.d.ts +28 -2
- package/lib/chevre/repo/event.d.ts +27 -3
- package/lib/chevre/repo/event.js +3 -2
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +29 -3
- package/lib/chevre/repo/merchantReturnPolicy.js +3 -2
- package/lib/chevre/repo/mongoose/model/account.d.ts +24 -1
- package/lib/chevre/repo/mongoose/model/accountTitle.d.ts +34 -1
- package/lib/chevre/repo/mongoose/model/accountTransaction.d.ts +37 -1
- package/lib/chevre/repo/mongoose/model/accountingReport.d.ts +28 -1
- package/lib/chevre/repo/mongoose/model/action.d.ts +43 -1
- package/lib/chevre/repo/mongoose/model/additionalProperty.d.ts +30 -1
- package/lib/chevre/repo/mongoose/model/aggregation.d.ts +24 -1
- package/lib/chevre/repo/mongoose/model/assetTransaction.d.ts +42 -1
- package/lib/chevre/repo/mongoose/model/authorization.d.ts +31 -1
- package/lib/chevre/repo/mongoose/model/categoryCode.d.ts +34 -1
- package/lib/chevre/repo/mongoose/model/comments.d.ts +35 -1
- package/lib/chevre/repo/mongoose/model/creativeWork.d.ts +43 -1
- package/lib/chevre/repo/mongoose/model/customer.d.ts +34 -1
- package/lib/chevre/repo/mongoose/model/emailMessages.d.ts +32 -1
- package/lib/chevre/repo/mongoose/model/event.d.ts +57 -1
- package/lib/chevre/repo/mongoose/model/member.d.ts +28 -1
- package/lib/chevre/repo/mongoose/model/merchantReturnPolicy.d.ts +32 -1
- package/lib/chevre/repo/mongoose/model/offer.d.ts +53 -1
- package/lib/chevre/repo/mongoose/model/offerCatalog.d.ts +34 -1
- package/lib/chevre/repo/mongoose/model/order.d.ts +47 -1
- package/lib/chevre/repo/mongoose/model/ownershipInfo.d.ts +34 -1
- package/lib/chevre/repo/mongoose/model/place.d.ts +46 -1
- package/lib/chevre/repo/mongoose/model/priceSpecification.d.ts +36 -1
- package/lib/chevre/repo/mongoose/model/product.d.ts +37 -1
- package/lib/chevre/repo/mongoose/model/project.d.ts +33 -1
- package/lib/chevre/repo/mongoose/model/reservation.d.ts +52 -1
- package/lib/chevre/repo/mongoose/model/role.d.ts +27 -1
- package/lib/chevre/repo/mongoose/model/seller.d.ts +37 -1
- package/lib/chevre/repo/mongoose/model/serviceOutput.d.ts +27 -1
- package/lib/chevre/repo/mongoose/model/task.d.ts +35 -1
- package/lib/chevre/repo/mongoose/model/telemetry.d.ts +32 -1
- package/lib/chevre/repo/mongoose/model/transaction.d.ts +40 -1
- package/lib/chevre/repo/mongoose/model/trip.d.ts +27 -1
- package/lib/chevre/repo/offer.d.ts +26 -2
- package/lib/chevre/repo/offer.js +3 -2
- package/lib/chevre/repo/offerCatalog.d.ts +25 -1
- package/lib/chevre/repo/offerCatalog.js +2 -22
- package/lib/chevre/repo/order.js +4 -3
- package/lib/chevre/repo/ownershipInfo.d.ts +25 -5
- package/lib/chevre/repo/ownershipInfo.js +7 -10
- package/lib/chevre/repo/place.d.ts +25 -1
- package/lib/chevre/repo/place.js +8 -6
- package/lib/chevre/repo/priceSpecification.d.ts +27 -8
- package/lib/chevre/repo/priceSpecification.js +3 -2
- package/lib/chevre/repo/product.d.ts +25 -1
- package/lib/chevre/repo/product.js +3 -2
- package/lib/chevre/repo/project.d.ts +25 -1
- package/lib/chevre/repo/project.js +3 -2
- package/lib/chevre/repo/reservation.d.ts +1 -1
- package/lib/chevre/repo/reservation.js +5 -4
- package/lib/chevre/repo/seller.d.ts +25 -1
- package/lib/chevre/repo/seller.js +3 -2
- package/lib/chevre/repo/serviceOutput.d.ts +1 -1
- package/lib/chevre/repo/serviceOutput.js +3 -3
- package/lib/chevre/repo/task.d.ts +4 -7
- package/lib/chevre/repo/task.js +10 -5
- package/lib/chevre/repo/transaction.js +3 -2
- package/lib/chevre/service/assetTransaction/cancelReservation.d.ts +3 -1
- package/lib/chevre/service/assetTransaction/moneyTransfer.d.ts +3 -1
- package/lib/chevre/service/assetTransaction/pay.d.ts +3 -1
- package/lib/chevre/service/assetTransaction/refund.d.ts +3 -1
- package/lib/chevre/service/assetTransaction/registerService.d.ts +3 -1
- package/lib/chevre/service/assetTransaction/reserve.d.ts +3 -1
- package/lib/chevre/service/assetTransaction.d.ts +3 -1
- package/lib/chevre/service/assetTransaction.js +8 -8
- package/lib/chevre/service/payment/any/onPaid.d.ts +3 -1
- package/lib/chevre/service/payment/any/onRefund.d.ts +3 -1
- package/lib/chevre/service/reserve/cancelReservation.js +10 -6
- package/package.json +4 -4
- package/example/src/chevre/retryTasks.ts +0 -69
|
@@ -3,5 +3,39 @@ declare const modelName = "Task";
|
|
|
3
3
|
/**
|
|
4
4
|
* タスクスキーマ
|
|
5
5
|
*/
|
|
6
|
-
declare const schema: mongoose.Schema<
|
|
6
|
+
declare const schema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any>, {}, {}, {}, {}, mongoose.ResolveSchemaOptions<{
|
|
7
|
+
collection: string;
|
|
8
|
+
id: true;
|
|
9
|
+
read: string;
|
|
10
|
+
writeConcern: import("mongodb").WriteConcern;
|
|
11
|
+
strict: true;
|
|
12
|
+
useNestedStrict: boolean;
|
|
13
|
+
timestamps: {
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
};
|
|
17
|
+
toJSON: {
|
|
18
|
+
getters: false;
|
|
19
|
+
virtuals: false;
|
|
20
|
+
minimize: false;
|
|
21
|
+
versionKey: false;
|
|
22
|
+
};
|
|
23
|
+
toObject: {
|
|
24
|
+
getters: false;
|
|
25
|
+
virtuals: true;
|
|
26
|
+
minimize: false;
|
|
27
|
+
versionKey: false;
|
|
28
|
+
};
|
|
29
|
+
}>, {
|
|
30
|
+
executionResults: any[];
|
|
31
|
+
name?: string | undefined;
|
|
32
|
+
status?: string | undefined;
|
|
33
|
+
data?: any;
|
|
34
|
+
project?: any;
|
|
35
|
+
runsAt?: Date | undefined;
|
|
36
|
+
remainingNumberOfTries?: number | undefined;
|
|
37
|
+
lastTriedAt?: Date | undefined;
|
|
38
|
+
numberOfTried?: number | undefined;
|
|
39
|
+
dateAborted?: Date | undefined;
|
|
40
|
+
}>;
|
|
7
41
|
export { modelName, schema };
|
|
@@ -3,5 +3,36 @@ declare const modelName = "Telemetry";
|
|
|
3
3
|
/**
|
|
4
4
|
* 測定スキーマ
|
|
5
5
|
*/
|
|
6
|
-
declare const schema: mongoose.Schema<
|
|
6
|
+
declare const schema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any>, {}, {}, {}, {}, mongoose.ResolveSchemaOptions<{
|
|
7
|
+
collection: string;
|
|
8
|
+
id: true;
|
|
9
|
+
read: string;
|
|
10
|
+
writeConcern: import("mongodb").WriteConcern;
|
|
11
|
+
strict: true;
|
|
12
|
+
useNestedStrict: boolean;
|
|
13
|
+
timestamps: {
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
};
|
|
17
|
+
toJSON: {
|
|
18
|
+
getters: false;
|
|
19
|
+
virtuals: false;
|
|
20
|
+
minimize: false;
|
|
21
|
+
versionKey: false;
|
|
22
|
+
};
|
|
23
|
+
toObject: {
|
|
24
|
+
getters: false;
|
|
25
|
+
virtuals: true;
|
|
26
|
+
minimize: false;
|
|
27
|
+
versionKey: false;
|
|
28
|
+
};
|
|
29
|
+
}>, {
|
|
30
|
+
object?: any;
|
|
31
|
+
error?: any;
|
|
32
|
+
project?: any;
|
|
33
|
+
startDate?: Date | undefined;
|
|
34
|
+
endDate?: Date | undefined;
|
|
35
|
+
result?: any;
|
|
36
|
+
purpose?: any;
|
|
37
|
+
}>;
|
|
7
38
|
export { modelName, schema };
|
|
@@ -3,5 +3,44 @@ declare const modelName = "Transaction";
|
|
|
3
3
|
/**
|
|
4
4
|
* 取引スキーマ
|
|
5
5
|
*/
|
|
6
|
-
declare const schema: mongoose.Schema<
|
|
6
|
+
declare const schema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any>, {}, {}, {}, {}, mongoose.ResolveSchemaOptions<{
|
|
7
|
+
collection: string;
|
|
8
|
+
id: true;
|
|
9
|
+
read: string;
|
|
10
|
+
writeConcern: import("mongodb").WriteConcern;
|
|
11
|
+
strict: true;
|
|
12
|
+
useNestedStrict: boolean;
|
|
13
|
+
timestamps: {
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
};
|
|
17
|
+
toJSON: {
|
|
18
|
+
getters: false;
|
|
19
|
+
virtuals: false;
|
|
20
|
+
minimize: false;
|
|
21
|
+
versionKey: false;
|
|
22
|
+
};
|
|
23
|
+
toObject: {
|
|
24
|
+
getters: false;
|
|
25
|
+
virtuals: true;
|
|
26
|
+
minimize: false;
|
|
27
|
+
versionKey: false;
|
|
28
|
+
};
|
|
29
|
+
}>, {
|
|
30
|
+
object?: any;
|
|
31
|
+
typeOf?: string | undefined;
|
|
32
|
+
status?: string | undefined;
|
|
33
|
+
expires?: Date | undefined;
|
|
34
|
+
error?: any;
|
|
35
|
+
project?: any;
|
|
36
|
+
agent?: any;
|
|
37
|
+
recipient?: any;
|
|
38
|
+
startDate?: Date | undefined;
|
|
39
|
+
endDate?: Date | undefined;
|
|
40
|
+
potentialActions?: any;
|
|
41
|
+
tasksExportationStatus?: string | undefined;
|
|
42
|
+
tasksExportedAt?: Date | undefined;
|
|
43
|
+
result?: any;
|
|
44
|
+
seller?: any;
|
|
45
|
+
}>;
|
|
7
46
|
export { modelName, schema };
|
|
@@ -3,5 +3,31 @@ declare const modelName = "Trip";
|
|
|
3
3
|
/**
|
|
4
4
|
* トリップスキーマ
|
|
5
5
|
*/
|
|
6
|
-
declare const schema: mongoose.Schema<
|
|
6
|
+
declare const schema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any>, {}, {}, {}, {}, mongoose.ResolveSchemaOptions<{
|
|
7
|
+
collection: string;
|
|
8
|
+
id: true;
|
|
9
|
+
read: string;
|
|
10
|
+
writeConcern: import("mongodb").WriteConcern;
|
|
11
|
+
strict: false;
|
|
12
|
+
useNestedStrict: boolean;
|
|
13
|
+
timestamps: {
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
};
|
|
17
|
+
toJSON: {
|
|
18
|
+
getters: false;
|
|
19
|
+
virtuals: false;
|
|
20
|
+
minimize: false;
|
|
21
|
+
versionKey: false;
|
|
22
|
+
};
|
|
23
|
+
toObject: {
|
|
24
|
+
getters: false;
|
|
25
|
+
virtuals: true;
|
|
26
|
+
minimize: false;
|
|
27
|
+
versionKey: false;
|
|
28
|
+
};
|
|
29
|
+
}>, {
|
|
30
|
+
typeOf: string;
|
|
31
|
+
project?: any;
|
|
32
|
+
}>;
|
|
7
33
|
export { modelName, schema };
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { Connection } from 'mongoose';
|
|
2
26
|
import * as factory from '../factory';
|
|
3
27
|
interface IProjection {
|
|
@@ -55,10 +79,10 @@ export declare class MongoRepository {
|
|
|
55
79
|
id: string;
|
|
56
80
|
};
|
|
57
81
|
}): Promise<void>;
|
|
58
|
-
getCursor(conditions: any, projection: any): import("mongoose").
|
|
82
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
59
83
|
unsetUnnecessaryFields(params: {
|
|
60
84
|
filter: any;
|
|
61
85
|
$unset: any;
|
|
62
|
-
}): Promise<import("
|
|
86
|
+
}): Promise<import("mongodb").UpdateResult>;
|
|
63
87
|
}
|
|
64
88
|
export {};
|
package/lib/chevre/repo/offer.js
CHANGED
|
@@ -414,6 +414,7 @@ class MongoRepository {
|
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
search(params, projection) {
|
|
417
|
+
var _a;
|
|
417
418
|
return __awaiter(this, void 0, void 0, function* () {
|
|
418
419
|
const conditions = MongoRepository.CREATE_OFFER_MONGO_CONDITIONS(params);
|
|
419
420
|
const positiveProjectionExists = (projection !== undefined && projection !== null)
|
|
@@ -430,8 +431,8 @@ class MongoRepository {
|
|
|
430
431
|
}
|
|
431
432
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
432
433
|
/* istanbul ignore else */
|
|
433
|
-
if (params.sort !== undefined) {
|
|
434
|
-
query.sort(params.sort);
|
|
434
|
+
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a['priceSpecification.price']) !== undefined) {
|
|
435
|
+
query.sort({ 'priceSpecification.price': params.sort['priceSpecification.price'] });
|
|
435
436
|
}
|
|
436
437
|
return query.setOptions({ maxTimeMS: 10000 })
|
|
437
438
|
.exec()
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { Connection } from 'mongoose';
|
|
2
26
|
import * as factory from '../factory';
|
|
3
27
|
/**
|
|
@@ -39,5 +63,5 @@ export declare class MongoRepository {
|
|
|
39
63
|
id: string;
|
|
40
64
|
};
|
|
41
65
|
}): Promise<void>;
|
|
42
|
-
getCursor(conditions: any, projection: any): import("mongoose").
|
|
66
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
43
67
|
}
|
|
@@ -206,6 +206,7 @@ class MongoRepository {
|
|
|
206
206
|
// .exec();
|
|
207
207
|
// }
|
|
208
208
|
search(params) {
|
|
209
|
+
var _a;
|
|
209
210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
210
211
|
const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
|
|
211
212
|
const matchStages = conditions.map((condition) => {
|
|
@@ -213,7 +214,7 @@ class MongoRepository {
|
|
|
213
214
|
});
|
|
214
215
|
// numberOfItems集計(2023-02-28~)
|
|
215
216
|
const aggregate = this.offerCatalogModel.aggregate([
|
|
216
|
-
...(params.sort !== undefined) ? [{ $sort: params.sort }] : [],
|
|
217
|
+
...(((_a = params.sort) === null || _a === void 0 ? void 0 : _a.identifier) !== undefined) ? [{ $sort: { identifier: params.sort.identifier } }] : [],
|
|
217
218
|
...matchStages,
|
|
218
219
|
{
|
|
219
220
|
$project: {
|
|
@@ -243,27 +244,6 @@ class MongoRepository {
|
|
|
243
244
|
.skip(params.limit * (page - 1));
|
|
244
245
|
}
|
|
245
246
|
return aggregate.exec();
|
|
246
|
-
// const query = this.offerCatalogModel.find(
|
|
247
|
-
// (conditions.length > 0) ? { $and: conditions } : {},
|
|
248
|
-
// {
|
|
249
|
-
// __v: 0,
|
|
250
|
-
// createdAt: 0,
|
|
251
|
-
// updatedAt: 0
|
|
252
|
-
// }
|
|
253
|
-
// );
|
|
254
|
-
// if (typeof params.limit === 'number') {
|
|
255
|
-
// const page: number = (typeof params.page === 'number') ? params.page : 1;
|
|
256
|
-
// query.limit(params.limit)
|
|
257
|
-
// .skip(params.limit * (page - 1));
|
|
258
|
-
// }
|
|
259
|
-
// // tslint:disable-next-line:no-single-line-block-comment
|
|
260
|
-
// /* istanbul ignore else */
|
|
261
|
-
// if (params.sort !== undefined) {
|
|
262
|
-
// query.sort(params.sort);
|
|
263
|
-
// }
|
|
264
|
-
// return query.setOptions({ maxTimeMS: 10000 })
|
|
265
|
-
// .exec()
|
|
266
|
-
// .then((docs) => docs.map((doc) => doc.toObject()));
|
|
267
247
|
});
|
|
268
248
|
}
|
|
269
249
|
deleteById(params) {
|
package/lib/chevre/repo/order.js
CHANGED
|
@@ -894,6 +894,7 @@ class MongoRepository {
|
|
|
894
894
|
* 注文を検索する
|
|
895
895
|
*/
|
|
896
896
|
search(params, projection) {
|
|
897
|
+
var _a;
|
|
897
898
|
return __awaiter(this, void 0, void 0, function* () {
|
|
898
899
|
const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
|
|
899
900
|
const query = this.orderModel.find((conditions.length > 0) ? { $and: conditions } : {})
|
|
@@ -905,8 +906,8 @@ class MongoRepository {
|
|
|
905
906
|
}
|
|
906
907
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
907
908
|
/* istanbul ignore else */
|
|
908
|
-
if (params.sort !== undefined) {
|
|
909
|
-
query.sort(params.sort);
|
|
909
|
+
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a.orderDate) !== undefined) {
|
|
910
|
+
query.sort({ orderDate: params.sort.orderDate });
|
|
910
911
|
}
|
|
911
912
|
// const explainResult = await (<any>query).explain();
|
|
912
913
|
// console.log(explainResult[0].executionStats.allPlansExecution.map((e: any) => e.executionStages.inputStage));
|
|
@@ -955,7 +956,7 @@ class MongoRepository {
|
|
|
955
956
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
956
957
|
/* istanbul ignore else */
|
|
957
958
|
if (typeof ((_a = params.sort) === null || _a === void 0 ? void 0 : _a.orderDate) === 'number') {
|
|
958
|
-
aggregate.sort(params.sort);
|
|
959
|
+
aggregate.sort({ orderDate: params.sort.orderDate });
|
|
959
960
|
}
|
|
960
961
|
aggregate.unwind('$acceptedOffers');
|
|
961
962
|
conditions.forEach((c) => {
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { Connection } from 'mongoose';
|
|
2
26
|
import { modelName } from './mongoose/model/ownershipInfo';
|
|
3
27
|
import * as factory from '../factory';
|
|
@@ -43,8 +67,6 @@ export declare class MongoRepository {
|
|
|
43
67
|
id: string;
|
|
44
68
|
};
|
|
45
69
|
}): Promise<{
|
|
46
|
-
n?: any;
|
|
47
|
-
ok?: any;
|
|
48
70
|
deletedCount?: number;
|
|
49
71
|
}>;
|
|
50
72
|
/**
|
|
@@ -59,8 +81,6 @@ export declare class MongoRepository {
|
|
|
59
81
|
id: string;
|
|
60
82
|
};
|
|
61
83
|
}): Promise<{
|
|
62
|
-
n?: any;
|
|
63
|
-
ok?: any;
|
|
64
84
|
deletedCount?: number;
|
|
65
85
|
}>;
|
|
66
86
|
/**
|
|
@@ -75,7 +95,7 @@ export declare class MongoRepository {
|
|
|
75
95
|
$lt: Date;
|
|
76
96
|
};
|
|
77
97
|
}): Promise<void>;
|
|
78
|
-
getCursor(conditions: any, projection: any): import("mongoose").
|
|
98
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
79
99
|
/**
|
|
80
100
|
* 所有者を追加する
|
|
81
101
|
*/
|
|
@@ -287,6 +287,7 @@ class MongoRepository {
|
|
|
287
287
|
* 所有権を検索する
|
|
288
288
|
*/
|
|
289
289
|
search(params, projection) {
|
|
290
|
+
var _a;
|
|
290
291
|
return __awaiter(this, void 0, void 0, function* () {
|
|
291
292
|
const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
|
|
292
293
|
const query = this.ownershipInfoModel.find((conditions.length > 0) ? { $and: conditions } : {}, Object.assign({ __v: 0, createdAt: 0, updatedAt: 0 }, projection));
|
|
@@ -297,8 +298,8 @@ class MongoRepository {
|
|
|
297
298
|
}
|
|
298
299
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
299
300
|
/* istanbul ignore else */
|
|
300
|
-
if (params.sort !== undefined) {
|
|
301
|
-
query.sort(params.sort);
|
|
301
|
+
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a.ownedFrom) !== undefined) {
|
|
302
|
+
query.sort({ ownedFrom: params.sort.ownedFrom });
|
|
302
303
|
}
|
|
303
304
|
return query.setOptions({ maxTimeMS: 10000 })
|
|
304
305
|
.exec()
|
|
@@ -340,10 +341,8 @@ class MongoRepository {
|
|
|
340
341
|
.exec()
|
|
341
342
|
.then((deleteOneResult) => {
|
|
342
343
|
return {
|
|
343
|
-
n: deleteOneResult
|
|
344
|
-
//
|
|
345
|
-
ok: deleteOneResult === null || deleteOneResult === void 0 ? void 0 : deleteOneResult.ok,
|
|
346
|
-
// operationTime,
|
|
344
|
+
// n: deleteOneResult?.n,
|
|
345
|
+
// ok: deleteOneResult?.ok,
|
|
347
346
|
deletedCount: deleteOneResult === null || deleteOneResult === void 0 ? void 0 : deleteOneResult.deletedCount
|
|
348
347
|
};
|
|
349
348
|
});
|
|
@@ -362,10 +361,8 @@ class MongoRepository {
|
|
|
362
361
|
.exec()
|
|
363
362
|
.then((deleteOneResult) => {
|
|
364
363
|
return {
|
|
365
|
-
n: deleteOneResult
|
|
366
|
-
//
|
|
367
|
-
ok: deleteOneResult === null || deleteOneResult === void 0 ? void 0 : deleteOneResult.ok,
|
|
368
|
-
// operationTime,
|
|
364
|
+
// n: deleteOneResult?.n,
|
|
365
|
+
// ok: deleteOneResult?.ok,
|
|
369
366
|
deletedCount: deleteOneResult === null || deleteOneResult === void 0 ? void 0 : deleteOneResult.deletedCount
|
|
370
367
|
};
|
|
371
368
|
});
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { Connection } from 'mongoose';
|
|
2
26
|
import * as factory from '../factory';
|
|
3
27
|
declare type IScreeningRoomSectionWithoutContainsPlace = Omit<factory.place.screeningRoomSection.IPlace, 'containsPlace'>;
|
|
@@ -139,6 +163,6 @@ export declare class MongoRepository {
|
|
|
139
163
|
deleteBusStopById(params: {
|
|
140
164
|
id: string;
|
|
141
165
|
}): Promise<void>;
|
|
142
|
-
getCursor(conditions: any, projection: any): import("mongoose").
|
|
166
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
143
167
|
}
|
|
144
168
|
export {};
|
package/lib/chevre/repo/place.js
CHANGED
|
@@ -268,6 +268,7 @@ class MongoRepository {
|
|
|
268
268
|
* 施設検索
|
|
269
269
|
*/
|
|
270
270
|
searchMovieTheaters(params) {
|
|
271
|
+
var _a;
|
|
271
272
|
return __awaiter(this, void 0, void 0, function* () {
|
|
272
273
|
const conditions = MongoRepository.CREATE_MOVIE_THEATER_MONGO_CONDITIONS(params);
|
|
273
274
|
// containsPlaceを含めるとデータサイズが大きくなるので、検索結果には含めない
|
|
@@ -284,8 +285,8 @@ class MongoRepository {
|
|
|
284
285
|
}
|
|
285
286
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
286
287
|
/* istanbul ignore else */
|
|
287
|
-
if (params.sort !== undefined) {
|
|
288
|
-
query.sort(params.sort);
|
|
288
|
+
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a.branchCode) !== undefined) {
|
|
289
|
+
query.sort({ branchCode: params.sort.branchCode });
|
|
289
290
|
}
|
|
290
291
|
return query.setOptions({ maxTimeMS: 10000 })
|
|
291
292
|
.exec()
|
|
@@ -677,7 +678,7 @@ class MongoRepository {
|
|
|
677
678
|
if (typeof containedInPlaceIdEq === 'string') {
|
|
678
679
|
matchStages.push({
|
|
679
680
|
$match: {
|
|
680
|
-
_id: { $eq: mongoose_1.Types.ObjectId(containedInPlaceIdEq) }
|
|
681
|
+
_id: { $eq: new mongoose_1.Types.ObjectId(containedInPlaceIdEq) }
|
|
681
682
|
}
|
|
682
683
|
});
|
|
683
684
|
}
|
|
@@ -817,7 +818,7 @@ class MongoRepository {
|
|
|
817
818
|
const matchStages = [
|
|
818
819
|
{ $match: { typeOf: { $eq: factory.placeType.MovieTheater } } },
|
|
819
820
|
{
|
|
820
|
-
$match: { _id: { $eq: mongoose_1.Types.ObjectId(params.containedInPlace.id.$eq) } }
|
|
821
|
+
$match: { _id: { $eq: new mongoose_1.Types.ObjectId(params.containedInPlace.id.$eq) } }
|
|
821
822
|
},
|
|
822
823
|
{
|
|
823
824
|
$match: { 'containsPlace.branchCode': { $exists: true, $eq: params.branchCode.$eq } }
|
|
@@ -1219,6 +1220,7 @@ class MongoRepository {
|
|
|
1219
1220
|
});
|
|
1220
1221
|
}
|
|
1221
1222
|
searchBusStops(params) {
|
|
1223
|
+
var _a;
|
|
1222
1224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1223
1225
|
const conditions = MongoRepository.CREATE_BUS_STOP_MONGO_CONDITIONS(params);
|
|
1224
1226
|
// containsPlaceを含めるとデータサイズが大きくなるので、検索結果には含めない
|
|
@@ -1235,8 +1237,8 @@ class MongoRepository {
|
|
|
1235
1237
|
}
|
|
1236
1238
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
1237
1239
|
/* istanbul ignore else */
|
|
1238
|
-
if (params.sort !== undefined) {
|
|
1239
|
-
query.sort(params.sort);
|
|
1240
|
+
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a.branchCode) !== undefined) {
|
|
1241
|
+
query.sort({ branchCode: params.sort.branchCode });
|
|
1240
1242
|
}
|
|
1241
1243
|
return query.setOptions({ maxTimeMS: 10000 })
|
|
1242
1244
|
.exec()
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { Connection } from 'mongoose';
|
|
2
26
|
import * as factory from '../factory';
|
|
3
27
|
/**
|
|
@@ -34,12 +58,7 @@ export declare class MongoRepository {
|
|
|
34
58
|
project?: {
|
|
35
59
|
id?: string;
|
|
36
60
|
};
|
|
37
|
-
}): Promise<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} & {
|
|
41
|
-
deletedCount?: number | undefined;
|
|
42
|
-
}>;
|
|
43
|
-
getCursor(conditions: any, projection: any): import("mongoose").QueryCursor<any>;
|
|
44
|
-
reIndex(): Promise<any>;
|
|
61
|
+
}): Promise<import("mongodb").DeleteResult>;
|
|
62
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
63
|
+
reIndex(): Promise<import("bson").Document>;
|
|
45
64
|
}
|
|
@@ -161,6 +161,7 @@ class MongoRepository {
|
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
search(params) {
|
|
164
|
+
var _a;
|
|
164
165
|
return __awaiter(this, void 0, void 0, function* () {
|
|
165
166
|
const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
|
|
166
167
|
const query = this.priceSpecificationModel.find((conditions.length > 0) ? { $and: conditions } : {}, {
|
|
@@ -175,8 +176,8 @@ class MongoRepository {
|
|
|
175
176
|
}
|
|
176
177
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
177
178
|
/* istanbul ignore else */
|
|
178
|
-
if (params.sort !== undefined) {
|
|
179
|
-
query.sort(params.sort);
|
|
179
|
+
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a.price) !== undefined) {
|
|
180
|
+
query.sort({ price: params.sort.price });
|
|
180
181
|
}
|
|
181
182
|
// const explainResult = await (<any>query).explain();
|
|
182
183
|
// console.log(explainResult[0].executionStats.allPlansExecution.map((e: any) => e.executionStages.inputStage));
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { Connection } from 'mongoose';
|
|
2
26
|
import * as factory from '../factory';
|
|
3
27
|
export declare type IProduct = factory.product.IProduct | factory.service.paymentService.IService;
|
|
@@ -52,5 +76,5 @@ export declare class MongoRepository {
|
|
|
52
76
|
id: string;
|
|
53
77
|
};
|
|
54
78
|
}): Promise<void>;
|
|
55
|
-
getCursor(conditions: any, projection: any): import("mongoose").
|
|
79
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
56
80
|
}
|
|
@@ -156,6 +156,7 @@ class MongoRepository {
|
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
search(conditions, projection) {
|
|
159
|
+
var _a;
|
|
159
160
|
return __awaiter(this, void 0, void 0, function* () {
|
|
160
161
|
const andConditions = MongoRepository.CREATE_MONGO_CONDITIONS(conditions);
|
|
161
162
|
const query = this.productModel.find((andConditions.length > 0) ? { $and: andConditions } : {}, Object.assign({ __v: 0, createdAt: 0, updatedAt: 0 }, projection));
|
|
@@ -166,8 +167,8 @@ class MongoRepository {
|
|
|
166
167
|
}
|
|
167
168
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
168
169
|
/* istanbul ignore else */
|
|
169
|
-
if (conditions.sort !== undefined) {
|
|
170
|
-
query.sort(conditions.sort);
|
|
170
|
+
if (((_a = conditions.sort) === null || _a === void 0 ? void 0 : _a.productID) !== undefined) {
|
|
171
|
+
query.sort({ productID: conditions.sort.productID });
|
|
171
172
|
}
|
|
172
173
|
return query.setOptions({ maxTimeMS: 10000 })
|
|
173
174
|
.exec()
|