@chevre/domain 20.2.0-alpha.14 → 20.2.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chevre/repo/aggregation.d.ts +8 -0
- package/lib/chevre/repo/aggregation.js +13 -0
- package/lib/chevre/repo/mongoose/model/aggregation.d.ts +7 -0
- package/lib/chevre/repo/mongoose/model/aggregation.js +47 -0
- package/lib/chevre/repo/mongoose/model/telemetry.js +4 -28
- package/lib/chevre/repository.d.ts +3 -0
- package/lib/chevre/repository.js +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MongoRepository = void 0;
|
|
4
|
+
const aggregation_1 = require("./mongoose/model/aggregation");
|
|
5
|
+
/**
|
|
6
|
+
* 集計リポジトリ
|
|
7
|
+
*/
|
|
8
|
+
class MongoRepository {
|
|
9
|
+
constructor(connection) {
|
|
10
|
+
this.aggregationModel = connection.model(aggregation_1.modelName);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.MongoRepository = MongoRepository;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as mongoose from 'mongoose';
|
|
2
|
+
declare const modelName = "Aggregation";
|
|
3
|
+
/**
|
|
4
|
+
* 集計スキーマ
|
|
5
|
+
*/
|
|
6
|
+
declare const schema: mongoose.Schema<mongoose.Document<any, any, any>, mongoose.Model<mongoose.Document<any, any, any>, any, any>, undefined, {}>;
|
|
7
|
+
export { modelName, schema };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schema = exports.modelName = void 0;
|
|
4
|
+
const mongoose = require("mongoose");
|
|
5
|
+
const modelName = 'Aggregation';
|
|
6
|
+
exports.modelName = modelName;
|
|
7
|
+
const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
|
|
8
|
+
/**
|
|
9
|
+
* 集計スキーマ
|
|
10
|
+
*/
|
|
11
|
+
const schema = new mongoose.Schema({}, {
|
|
12
|
+
collection: 'aggregations',
|
|
13
|
+
id: true,
|
|
14
|
+
read: 'primaryPreferred',
|
|
15
|
+
writeConcern: writeConcern,
|
|
16
|
+
strict: false,
|
|
17
|
+
useNestedStrict: true,
|
|
18
|
+
timestamps: {
|
|
19
|
+
createdAt: 'createdAt',
|
|
20
|
+
updatedAt: 'updatedAt'
|
|
21
|
+
},
|
|
22
|
+
toJSON: {
|
|
23
|
+
getters: false,
|
|
24
|
+
virtuals: false,
|
|
25
|
+
minimize: false,
|
|
26
|
+
versionKey: false
|
|
27
|
+
},
|
|
28
|
+
toObject: {
|
|
29
|
+
getters: false,
|
|
30
|
+
virtuals: true,
|
|
31
|
+
minimize: false,
|
|
32
|
+
versionKey: false
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
exports.schema = schema;
|
|
36
|
+
schema.index({ createdAt: 1 }, { name: 'searchByCreatedAt' });
|
|
37
|
+
schema.index({ updatedAt: 1 }, { name: 'searchByUpdatedAt' });
|
|
38
|
+
mongoose.model(modelName, schema)
|
|
39
|
+
.on('index',
|
|
40
|
+
// tslint:disable-next-line:no-single-line-block-comment
|
|
41
|
+
/* istanbul ignore next */
|
|
42
|
+
(error) => {
|
|
43
|
+
if (error !== undefined) {
|
|
44
|
+
// tslint:disable-next-line:no-console
|
|
45
|
+
console.error(error);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
@@ -5,41 +5,17 @@ const mongoose = require("mongoose");
|
|
|
5
5
|
const modelName = 'Telemetry';
|
|
6
6
|
exports.modelName = modelName;
|
|
7
7
|
const writeConcern = { j: true, w: 'majority', wtimeout: 10000 };
|
|
8
|
-
const purposeSchema = new mongoose.Schema({
|
|
9
|
-
typeOf: String
|
|
10
|
-
}, {
|
|
11
|
-
id: false,
|
|
12
|
-
_id: false,
|
|
13
|
-
strict: false
|
|
14
|
-
});
|
|
15
|
-
const objectSchema = new mongoose.Schema({
|
|
16
|
-
measuredAt: Date
|
|
17
|
-
}, {
|
|
18
|
-
id: false,
|
|
19
|
-
_id: false,
|
|
20
|
-
strict: false
|
|
21
|
-
});
|
|
22
|
-
const resultSchema = new mongoose.Schema({}, {
|
|
23
|
-
id: false,
|
|
24
|
-
_id: false,
|
|
25
|
-
strict: false
|
|
26
|
-
});
|
|
27
|
-
const errorSchema = new mongoose.Schema({}, {
|
|
28
|
-
id: false,
|
|
29
|
-
_id: false,
|
|
30
|
-
strict: false
|
|
31
|
-
});
|
|
32
8
|
/**
|
|
33
9
|
* 測定スキーマ
|
|
34
10
|
*/
|
|
35
11
|
const schema = new mongoose.Schema({
|
|
36
12
|
project: mongoose.SchemaTypes.Mixed,
|
|
37
|
-
result:
|
|
38
|
-
error:
|
|
39
|
-
object:
|
|
13
|
+
result: mongoose.SchemaTypes.Mixed,
|
|
14
|
+
error: mongoose.SchemaTypes.Mixed,
|
|
15
|
+
object: mongoose.SchemaTypes.Mixed,
|
|
40
16
|
startDate: Date,
|
|
41
17
|
endDate: Date,
|
|
42
|
-
purpose:
|
|
18
|
+
purpose: mongoose.SchemaTypes.Mixed
|
|
43
19
|
}, {
|
|
44
20
|
collection: 'telemetries',
|
|
45
21
|
id: true,
|
|
@@ -7,6 +7,7 @@ import { MongoRepository as AccountTitleRepo } from './repo/accountTitle';
|
|
|
7
7
|
import { MongoRepository as AccountTransactionRepo } from './repo/accountTransaction';
|
|
8
8
|
import { MongoRepository as ActionRepo } from './repo/action';
|
|
9
9
|
import { MongoRepository as AdditionalPropertyRepo } from './repo/additionalProperty';
|
|
10
|
+
import { MongoRepository as AggregationRepo } from './repo/aggregation';
|
|
10
11
|
import { MongoRepository as AssetTransactionRepo } from './repo/assetTransaction';
|
|
11
12
|
import { MongoRepository as CategoryCodeRepo } from './repo/categoryCode';
|
|
12
13
|
import { MongoRepository as CodeRepo } from './repo/code';
|
|
@@ -69,6 +70,8 @@ export declare class Action extends ActionRepo {
|
|
|
69
70
|
*/
|
|
70
71
|
export declare class AdditionalProperty extends AdditionalPropertyRepo {
|
|
71
72
|
}
|
|
73
|
+
export declare class Aggregation extends AggregationRepo {
|
|
74
|
+
}
|
|
72
75
|
export declare namespace action {
|
|
73
76
|
class RegisterServiceInProgress extends RegisterServiceActionInProgress {
|
|
74
77
|
}
|
package/lib/chevre/repository.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rateLimit = exports.itemAvailability = exports.Trip = exports.TransactionNumber = exports.Transaction = exports.Telemetry = exports.Task = exports.ServiceOutputIdentifier = exports.ServiceOutput = exports.Seller = exports.Role = exports.Reservation = exports.Project = exports.Product = exports.PriceSpecification = exports.Place = exports.Permit = exports.Person = exports.paymentMethod = exports.OwnershipInfo = exports.OrderNumber = exports.Order = exports.OfferCatalog = exports.Offer = exports.MerchantReturnPolicy = exports.Member = exports.Event = exports.EmailMessage = exports.Customer = exports.CreativeWork = exports.ConfirmationNumber = exports.Code = exports.CategoryCode = exports.AssetTransaction = exports.action = exports.AdditionalProperty = exports.Action = exports.AccountTransaction = exports.AccountTitle = exports.AccountingReport = exports.Account = void 0;
|
|
3
|
+
exports.rateLimit = exports.itemAvailability = exports.Trip = exports.TransactionNumber = exports.Transaction = exports.Telemetry = exports.Task = exports.ServiceOutputIdentifier = exports.ServiceOutput = exports.Seller = exports.Role = exports.Reservation = exports.Project = exports.Product = exports.PriceSpecification = exports.Place = exports.Permit = exports.Person = exports.paymentMethod = exports.OwnershipInfo = exports.OrderNumber = exports.Order = exports.OfferCatalog = exports.Offer = exports.MerchantReturnPolicy = exports.Member = exports.Event = exports.EmailMessage = exports.Customer = exports.CreativeWork = exports.ConfirmationNumber = exports.Code = exports.CategoryCode = exports.AssetTransaction = exports.action = exports.Aggregation = exports.AdditionalProperty = exports.Action = exports.AccountTransaction = exports.AccountTitle = exports.AccountingReport = exports.Account = void 0;
|
|
4
4
|
// tslint:disable:max-classes-per-file completed-docs
|
|
5
5
|
/**
|
|
6
6
|
* リポジトリ
|
|
@@ -11,6 +11,7 @@ const accountTitle_1 = require("./repo/accountTitle");
|
|
|
11
11
|
const accountTransaction_1 = require("./repo/accountTransaction");
|
|
12
12
|
const action_1 = require("./repo/action");
|
|
13
13
|
const additionalProperty_1 = require("./repo/additionalProperty");
|
|
14
|
+
const aggregation_1 = require("./repo/aggregation");
|
|
14
15
|
const assetTransaction_1 = require("./repo/assetTransaction");
|
|
15
16
|
const categoryCode_1 = require("./repo/categoryCode");
|
|
16
17
|
const code_1 = require("./repo/code");
|
|
@@ -80,6 +81,9 @@ exports.Action = Action;
|
|
|
80
81
|
class AdditionalProperty extends additionalProperty_1.MongoRepository {
|
|
81
82
|
}
|
|
82
83
|
exports.AdditionalProperty = AdditionalProperty;
|
|
84
|
+
class Aggregation extends aggregation_1.MongoRepository {
|
|
85
|
+
}
|
|
86
|
+
exports.Aggregation = Aggregation;
|
|
83
87
|
var action;
|
|
84
88
|
(function (action) {
|
|
85
89
|
class RegisterServiceInProgress extends registerServiceInProgress_1.RedisRepository {
|
package/package.json
CHANGED