@resolveio/server-lib 7.0.4 → 7.1.0-newrole
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/client-server-app.d.ts +1 -0
- package/client-server-app.js +56 -0
- package/client-server-app.js.map +1 -0
- package/collections/monitor-cpu.collection.d.ts +7 -0
- package/collections/monitor-cpu.collection.js +56 -0
- package/collections/monitor-cpu.collection.js.map +1 -0
- package/collections/monitor-https-inbound.collection.d.ts +7 -0
- package/collections/monitor-https-inbound.collection.js +66 -0
- package/collections/monitor-https-inbound.collection.js.map +1 -0
- package/collections/monitor-https-outbound.collection.d.ts +7 -0
- package/collections/monitor-https-outbound.collection.js +72 -0
- package/collections/monitor-https-outbound.collection.js.map +1 -0
- package/collections/monitor-memory.collection.d.ts +7 -0
- package/collections/monitor-memory.collection.js +71 -0
- package/collections/monitor-memory.collection.js.map +1 -0
- package/collections/monitor-mongo.collection.d.ts +7 -0
- package/collections/monitor-mongo.collection.js +63 -0
- package/collections/monitor-mongo.collection.js.map +1 -0
- package/collections/user.collection.js +39 -32
- package/collections/user.collection.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +4 -2
- package/index.js.map +1 -1
- package/managers/method.manager.js +2 -0
- package/managers/method.manager.js.map +1 -1
- package/managers/monitor.manager.d.ts +7 -0
- package/managers/monitor.manager.js +244 -0
- package/managers/monitor.manager.js.map +1 -0
- package/methods/accounts.js.map +1 -1
- package/methods/monitor.d.ts +2 -0
- package/methods/monitor.js +39 -0
- package/methods/monitor.js.map +1 -0
- package/models/monitor-cpu.model.d.ts +7 -0
- package/models/monitor-cpu.model.js +4 -0
- package/models/monitor-cpu.model.js.map +1 -0
- package/models/monitor-https-inbound.model.d.ts +10 -0
- package/models/monitor-https-inbound.model.js +4 -0
- package/models/monitor-https-inbound.model.js.map +1 -0
- package/models/monitor-https-outbound.model.d.ts +11 -0
- package/models/monitor-https-outbound.model.js +4 -0
- package/models/monitor-https-outbound.model.js.map +1 -0
- package/models/monitor-memory.model.d.ts +11 -0
- package/models/monitor-memory.model.js +4 -0
- package/models/monitor-memory.model.js.map +1 -0
- package/models/monitor-mongo.model.d.ts +9 -0
- package/models/monitor-mongo.model.js +4 -0
- package/models/monitor-mongo.model.js.map +1 -0
- package/models/user.model.d.ts +25 -14
- package/models/user.model.js.map +1 -1
- package/package.json +3 -1
- package/publications/report-builder-libraries.js +2 -3
- package/publications/report-builder-libraries.js.map +1 -1
- package/server-app.d.ts +4 -1
- package/server-app.js +11 -4
- package/server-app.js.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var serverConfig = require('./settings.json');
|
|
40
|
+
var monitorAgent = null;
|
|
41
|
+
if (serverConfig['ROOT_URL'] !== 'http://localhost:4200') {
|
|
42
|
+
var appmetrics = require('appmetrics');
|
|
43
|
+
appmetrics.configure({
|
|
44
|
+
mqtt: 'off',
|
|
45
|
+
});
|
|
46
|
+
monitorAgent = appmetrics.monitor();
|
|
47
|
+
}
|
|
48
|
+
var index_1 = require("./index");
|
|
49
|
+
new index_1.ResolveIOServer(monitorAgent, serverConfig, 'ResolveIO Server Library', __dirname);
|
|
50
|
+
index_1.ResolveIOServer.connectAndRun().then(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
51
|
+
return __generator(this, function (_a) {
|
|
52
|
+
return [2 /*return*/];
|
|
53
|
+
});
|
|
54
|
+
}); });
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=client-server-app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/client-server-app.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAI,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC9C,IAAI,YAAY,GAAG,IAAI,CAAC;AACxB,IAAI,YAAY,CAAC,UAAU,CAAC,KAAK,uBAAuB,EAAE;IACzD,IAAI,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACvC,UAAU,CAAC,SAAS,CAAC;QACpB,IAAI,EAAE,KAAK;KAEX,CAAC,CAAC;IACH,YAAY,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC;CACpC;AAED,iCAA0C;AAE1C,IAAI,uBAAe,CAAC,YAAY,EAAE,YAAY,EAAE,0BAA0B,EAAE,SAAS,CAAC,CAAC;AACvF,uBAAe,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC;;;;KAEpC,CAAC,CAAC","file":"client-server-app.js","sourcesContent":["let serverConfig = require('./settings.json');\nlet monitorAgent = null;\nif (serverConfig['ROOT_URL'] !== 'http://localhost:4200') {\n\tlet appmetrics = require('appmetrics');\n\tappmetrics.configure({\n\t\tmqtt: 'off',\n\t\t// profiling: 'on'\n\t});\n\tmonitorAgent = appmetrics.monitor();\n}\n\nimport { ResolveIOServer } from './index';\n\nnew ResolveIOServer(monitorAgent, serverConfig, 'ResolveIO Server Library', __dirname);\nResolveIOServer.connectAndRun().then(async () => {\n\t\n});"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Model, Document } from 'mongoose';
|
|
2
|
+
import { MonitorCPUModel } from '../models/monitor-cpu.model';
|
|
3
|
+
interface ResolveIOModel extends MonitorCPUModel, Document {
|
|
4
|
+
}
|
|
5
|
+
export declare const MonitorCPUs: Model<ResolveIOModel>;
|
|
6
|
+
export declare const MonitorCPUVersions: Model<ResolveIOModel>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var mongoose_1 = require("mongoose");
|
|
4
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
+
var index_1 = require("../index");
|
|
6
|
+
var schema = {
|
|
7
|
+
_id: {
|
|
8
|
+
type: String,
|
|
9
|
+
optional: true
|
|
10
|
+
},
|
|
11
|
+
__v: {
|
|
12
|
+
type: Number,
|
|
13
|
+
optional: true
|
|
14
|
+
},
|
|
15
|
+
updatedAt: {
|
|
16
|
+
type: Date,
|
|
17
|
+
optional: true
|
|
18
|
+
},
|
|
19
|
+
createdAt: {
|
|
20
|
+
type: Date,
|
|
21
|
+
optional: true
|
|
22
|
+
},
|
|
23
|
+
client: {
|
|
24
|
+
type: String
|
|
25
|
+
},
|
|
26
|
+
date: {
|
|
27
|
+
type: Date
|
|
28
|
+
},
|
|
29
|
+
app: {
|
|
30
|
+
type: Number
|
|
31
|
+
},
|
|
32
|
+
system: {
|
|
33
|
+
type: Number
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
37
|
+
skipVersioning: true,
|
|
38
|
+
versionKey: false,
|
|
39
|
+
timestamps: true
|
|
40
|
+
});
|
|
41
|
+
DefaultSchema.index({ client: 1, date: 1 });
|
|
42
|
+
DefaultSchema.index({ date: 1 });
|
|
43
|
+
exports.MonitorCPUs = index_1.ResolveIOServer.getMainDB().model('monitor-cpus', DefaultSchema);
|
|
44
|
+
exports.MonitorCPUs['simplschema'] = new simpl_schema_1.default(schema);
|
|
45
|
+
schema._id = {
|
|
46
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
47
|
+
};
|
|
48
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
49
|
+
skipVersioning: true,
|
|
50
|
+
versionKey: false,
|
|
51
|
+
timestamps: true
|
|
52
|
+
});
|
|
53
|
+
exports.MonitorCPUs['versionCollection'] = 'monitor-cpus.versions';
|
|
54
|
+
exports.MonitorCPUVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorCPUs['versionCollection'], VersionSchema);
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=monitor-cpu.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/monitor-cpu.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AAC1C,aAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AAGlB,QAAA,WAAW,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;AAEnH,mBAAW,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,mBAAW,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,CAAC;AAE9C,QAAA,kBAAkB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,mBAAW,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"monitor-cpu.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorCPUModel } from '../models/monitor-cpu.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tapp: {\n\t\ttype: Number\n\t},\n\tsystem: {\n\t\ttype: Number\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, date: 1});\nDefaultSchema.index({date: 1});\n\ninterface ResolveIOModel extends MonitorCPUModel, Document {}\nexport const MonitorCPUs: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-cpus', DefaultSchema);\n\nMonitorCPUs['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorCPUs['versionCollection'] = 'monitor-cpus.versions';\n\nexport const MonitorCPUVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorCPUs['versionCollection'], VersionSchema);"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Model, Document } from 'mongoose';
|
|
2
|
+
import { MonitorHTTPSInboundModel } from '../models/monitor-https-inbound.model';
|
|
3
|
+
interface ResolveIOModel extends MonitorHTTPSInboundModel, Document {
|
|
4
|
+
}
|
|
5
|
+
export declare const MonitorHTTPSInbounds: Model<ResolveIOModel>;
|
|
6
|
+
export declare const MonitorHTTPInboundVersions: Model<ResolveIOModel>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var mongoose_1 = require("mongoose");
|
|
4
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
+
var index_1 = require("../index");
|
|
6
|
+
var schema = {
|
|
7
|
+
_id: {
|
|
8
|
+
type: String,
|
|
9
|
+
optional: true
|
|
10
|
+
},
|
|
11
|
+
__v: {
|
|
12
|
+
type: Number,
|
|
13
|
+
optional: true
|
|
14
|
+
},
|
|
15
|
+
updatedAt: {
|
|
16
|
+
type: Date,
|
|
17
|
+
optional: true
|
|
18
|
+
},
|
|
19
|
+
createdAt: {
|
|
20
|
+
type: Date,
|
|
21
|
+
optional: true
|
|
22
|
+
},
|
|
23
|
+
client: {
|
|
24
|
+
type: String
|
|
25
|
+
},
|
|
26
|
+
date: {
|
|
27
|
+
type: Date
|
|
28
|
+
},
|
|
29
|
+
method: {
|
|
30
|
+
type: String
|
|
31
|
+
},
|
|
32
|
+
url: {
|
|
33
|
+
type: String
|
|
34
|
+
},
|
|
35
|
+
duration: {
|
|
36
|
+
type: Number
|
|
37
|
+
},
|
|
38
|
+
contentType: {
|
|
39
|
+
type: String
|
|
40
|
+
},
|
|
41
|
+
requestHeader: {
|
|
42
|
+
type: String
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
46
|
+
skipVersioning: true,
|
|
47
|
+
versionKey: false,
|
|
48
|
+
timestamps: true
|
|
49
|
+
});
|
|
50
|
+
DefaultSchema.index({ client: 1, date: 1, duration: 1 });
|
|
51
|
+
DefaultSchema.index({ client: 1, date: 1, method: 1, url: 1 });
|
|
52
|
+
DefaultSchema.index({ date: 1 });
|
|
53
|
+
exports.MonitorHTTPSInbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-inbounds', DefaultSchema);
|
|
54
|
+
exports.MonitorHTTPSInbounds['simplschema'] = new simpl_schema_1.default(schema);
|
|
55
|
+
schema._id = {
|
|
56
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
57
|
+
};
|
|
58
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
59
|
+
skipVersioning: true,
|
|
60
|
+
versionKey: false,
|
|
61
|
+
timestamps: true
|
|
62
|
+
});
|
|
63
|
+
exports.MonitorHTTPSInbounds['versionCollection'] = 'monitor-https-inbounds.versions';
|
|
64
|
+
exports.MonitorHTTPInboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSInbounds['versionCollection'], VersionSchema);
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=monitor-https-inbound.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/monitor-https-inbound.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kC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AC;AAEtI,4BAAoB,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAE/D,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,4BAAoB,CAAC,mBAAmB,CAAC,GAAG,iCAAiC,CAAC;AAEjE,QAAA,0BAA0B,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,4BAAoB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"monitor-https-inbound.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorHTTPSInboundModel } from '../models/monitor-https-inbound.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\turl: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tcontentType: {\n\t\ttype: String\n\t},\n\trequestHeader: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, date: 1, duration: 1});\nDefaultSchema.index({client: 1, date: 1, method: 1, url: 1});\nDefaultSchema.index({date: 1});\n\ninterface ResolveIOModel extends MonitorHTTPSInboundModel, Document {}\nexport const MonitorHTTPSInbounds: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-https-inbounds', DefaultSchema);\n\nMonitorHTTPSInbounds['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorHTTPSInbounds['versionCollection'] = 'monitor-https-inbounds.versions';\n\nexport const MonitorHTTPInboundVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorHTTPSInbounds['versionCollection'], VersionSchema);"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Model, Document } from 'mongoose';
|
|
2
|
+
import { MonitorHTTPSOutboundModel } from '../models/monitor-https-outbound.model';
|
|
3
|
+
interface ResolveIOModel extends MonitorHTTPSOutboundModel, Document {
|
|
4
|
+
}
|
|
5
|
+
export declare const MonitorHTTPSOutbounds: Model<ResolveIOModel>;
|
|
6
|
+
export declare const MonitorHTTPSOutboundVersions: Model<ResolveIOModel>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var mongoose_1 = require("mongoose");
|
|
4
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
+
var index_1 = require("../index");
|
|
6
|
+
var schema = {
|
|
7
|
+
_id: {
|
|
8
|
+
type: String,
|
|
9
|
+
optional: true
|
|
10
|
+
},
|
|
11
|
+
__v: {
|
|
12
|
+
type: Number,
|
|
13
|
+
optional: true
|
|
14
|
+
},
|
|
15
|
+
updatedAt: {
|
|
16
|
+
type: Date,
|
|
17
|
+
optional: true
|
|
18
|
+
},
|
|
19
|
+
createdAt: {
|
|
20
|
+
type: Date,
|
|
21
|
+
optional: true
|
|
22
|
+
},
|
|
23
|
+
client: {
|
|
24
|
+
type: String
|
|
25
|
+
},
|
|
26
|
+
date: {
|
|
27
|
+
type: Date
|
|
28
|
+
},
|
|
29
|
+
method: {
|
|
30
|
+
type: String
|
|
31
|
+
},
|
|
32
|
+
url: {
|
|
33
|
+
type: String
|
|
34
|
+
},
|
|
35
|
+
duration: {
|
|
36
|
+
type: Number
|
|
37
|
+
},
|
|
38
|
+
status: {
|
|
39
|
+
type: String
|
|
40
|
+
},
|
|
41
|
+
contentType: {
|
|
42
|
+
type: String
|
|
43
|
+
},
|
|
44
|
+
requestHeaders: {
|
|
45
|
+
type: Object,
|
|
46
|
+
blackbox: true
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
50
|
+
skipVersioning: true,
|
|
51
|
+
versionKey: false,
|
|
52
|
+
timestamps: true
|
|
53
|
+
});
|
|
54
|
+
DefaultSchema.index({ client: 1, date: 1, duration: 1 });
|
|
55
|
+
DefaultSchema.index({ client: 1, date: 1, method: 1, url: 1, status: 1 });
|
|
56
|
+
DefaultSchema.index({ client: 1, date: 1, status: 1 });
|
|
57
|
+
DefaultSchema.index({ client: 1, status: 1 });
|
|
58
|
+
DefaultSchema.index({ date: 1 });
|
|
59
|
+
exports.MonitorHTTPSOutbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-outbounds', DefaultSchema);
|
|
60
|
+
exports.MonitorHTTPSOutbounds['simplschema'] = new simpl_schema_1.default(schema);
|
|
61
|
+
schema._id = {
|
|
62
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
63
|
+
};
|
|
64
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
65
|
+
skipVersioning: true,
|
|
66
|
+
versionKey: false,
|
|
67
|
+
timestamps: true
|
|
68
|
+
});
|
|
69
|
+
exports.MonitorHTTPSOutbounds['versionCollection'] = 'monitor-https-outbounds.versions';
|
|
70
|
+
exports.MonitorHTTPSOutboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSOutbounds['versionCollection'], VersionSchema);
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=monitor-https-outbound.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/monitor-https-outbound.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,cAAc,EAAE;QACf,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAC,CAAC,CAAC;AACvD,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;AACxE,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;AACrD,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;AAC5C,aAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AAGlB,QAAA,qBAAqB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,yBAAyB,EAAE,aAAa,CAAC,CAAC;AAExI,6BAAqB,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAEhE,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,6BAAqB,CAAC,mBAAmB,CAAC,GAAG,kCAAkC,CAAC;AAEnE,QAAA,4BAA4B,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,6BAAqB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"monitor-https-outbound.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorHTTPSOutboundModel } from '../models/monitor-https-outbound.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\turl: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tstatus: {\n\t\ttype: String\n\t},\n\tcontentType: {\n\t\ttype: String\n\t},\n\trequestHeaders: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, date: 1, duration: 1});\nDefaultSchema.index({client: 1, date: 1, method: 1, url: 1, status: 1});\nDefaultSchema.index({client: 1, date: 1, status: 1});\nDefaultSchema.index({client: 1, status: 1});\nDefaultSchema.index({date: 1});\n\ninterface ResolveIOModel extends MonitorHTTPSOutboundModel, Document {}\nexport const MonitorHTTPSOutbounds: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-https-outbounds', DefaultSchema);\n\nMonitorHTTPSOutbounds['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorHTTPSOutbounds['versionCollection'] = 'monitor-https-outbounds.versions';\n\nexport const MonitorHTTPSOutboundVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorHTTPSOutbounds['versionCollection'], VersionSchema);"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Model, Document } from 'mongoose';
|
|
2
|
+
import { MonitorMemoryModel } from '../models/monitor-memory.model';
|
|
3
|
+
interface ResolveIOModel extends MonitorMemoryModel, Document {
|
|
4
|
+
}
|
|
5
|
+
export declare const MonitorMemorys: Model<ResolveIOModel>;
|
|
6
|
+
export declare const MonitorMemoryVersions: Model<ResolveIOModel>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var mongoose_1 = require("mongoose");
|
|
4
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
+
var index_1 = require("../index");
|
|
6
|
+
var schema = {
|
|
7
|
+
_id: {
|
|
8
|
+
type: String,
|
|
9
|
+
optional: true
|
|
10
|
+
},
|
|
11
|
+
__v: {
|
|
12
|
+
type: Number,
|
|
13
|
+
optional: true
|
|
14
|
+
},
|
|
15
|
+
updatedAt: {
|
|
16
|
+
type: Date,
|
|
17
|
+
optional: true
|
|
18
|
+
},
|
|
19
|
+
createdAt: {
|
|
20
|
+
type: Date,
|
|
21
|
+
optional: true
|
|
22
|
+
},
|
|
23
|
+
client: {
|
|
24
|
+
type: String
|
|
25
|
+
},
|
|
26
|
+
date: {
|
|
27
|
+
type: Date
|
|
28
|
+
},
|
|
29
|
+
physical_total: {
|
|
30
|
+
type: Number
|
|
31
|
+
},
|
|
32
|
+
physical_used: {
|
|
33
|
+
type: Number
|
|
34
|
+
},
|
|
35
|
+
physical_free: {
|
|
36
|
+
type: Number
|
|
37
|
+
},
|
|
38
|
+
virtual: {
|
|
39
|
+
type: Number
|
|
40
|
+
},
|
|
41
|
+
private: {
|
|
42
|
+
type: Number
|
|
43
|
+
},
|
|
44
|
+
physical: {
|
|
45
|
+
type: Number
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
49
|
+
skipVersioning: true,
|
|
50
|
+
versionKey: false,
|
|
51
|
+
timestamps: true
|
|
52
|
+
});
|
|
53
|
+
DefaultSchema.index({ client: 1, date: 1, duration: 1 });
|
|
54
|
+
DefaultSchema.index({ client: 1, date: 1, method: 1, url: 1 });
|
|
55
|
+
DefaultSchema.index({ client: 1, date: 1, status: 1 });
|
|
56
|
+
DefaultSchema.index({ client: 1, status: 1 });
|
|
57
|
+
DefaultSchema.index({ date: 1 });
|
|
58
|
+
exports.MonitorMemorys = index_1.ResolveIOServer.getMainDB().model('monitor-memorys', DefaultSchema);
|
|
59
|
+
exports.MonitorMemorys['simplschema'] = new simpl_schema_1.default(schema);
|
|
60
|
+
schema._id = {
|
|
61
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
62
|
+
};
|
|
63
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
64
|
+
skipVersioning: true,
|
|
65
|
+
versionKey: false,
|
|
66
|
+
timestamps: true
|
|
67
|
+
});
|
|
68
|
+
exports.MonitorMemorys['versionCollection'] = 'monitor-memorys.versions';
|
|
69
|
+
exports.MonitorMemoryVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMemorys['versionCollection'], VersionSchema);
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=monitor-memory.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/monitor-memory.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,cAAc,EAAE;QACf,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EA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,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,sBAAc,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,CAAC;AAEpD,QAAA,qBAAqB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"monitor-memory.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorMemoryModel } from '../models/monitor-memory.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tphysical_total: {\n\t\ttype: Number\n\t},\n\tphysical_used: {\n\t\ttype: Number\n\t},\n\tphysical_free: {\n\t\ttype: Number\n\t},\n\tvirtual: {\n\t\ttype: Number\n\t},\n\tprivate: {\n\t\ttype: Number\n\t},\n\tphysical: {\n\t\ttype: Number\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, date: 1, duration: 1});\nDefaultSchema.index({client: 1, date: 1, method: 1, url: 1});\nDefaultSchema.index({client: 1, date: 1, status: 1});\nDefaultSchema.index({client: 1, status: 1});\nDefaultSchema.index({date: 1});\n\ninterface ResolveIOModel extends MonitorMemoryModel, Document {}\nexport const MonitorMemorys: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-memorys', DefaultSchema);\n\nMonitorMemorys['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorMemorys['versionCollection'] = 'monitor-memorys.versions';\n\nexport const MonitorMemoryVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorMemorys['versionCollection'], VersionSchema);"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Model, Document } from 'mongoose';
|
|
2
|
+
import { MonitorMongoModel } from '../models/monitor-mongo.model';
|
|
3
|
+
interface ResolveIOModel extends MonitorMongoModel, Document {
|
|
4
|
+
}
|
|
5
|
+
export declare const MonitorMongos: Model<ResolveIOModel>;
|
|
6
|
+
export declare const MonitorMongoVersions: Model<ResolveIOModel>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var mongoose_1 = require("mongoose");
|
|
4
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
+
var index_1 = require("../index");
|
|
6
|
+
var schema = {
|
|
7
|
+
_id: {
|
|
8
|
+
type: String,
|
|
9
|
+
optional: true
|
|
10
|
+
},
|
|
11
|
+
__v: {
|
|
12
|
+
type: Number,
|
|
13
|
+
optional: true
|
|
14
|
+
},
|
|
15
|
+
updatedAt: {
|
|
16
|
+
type: Date,
|
|
17
|
+
optional: true
|
|
18
|
+
},
|
|
19
|
+
createdAt: {
|
|
20
|
+
type: Date,
|
|
21
|
+
optional: true
|
|
22
|
+
},
|
|
23
|
+
client: {
|
|
24
|
+
type: String
|
|
25
|
+
},
|
|
26
|
+
date: {
|
|
27
|
+
type: Date
|
|
28
|
+
},
|
|
29
|
+
method: {
|
|
30
|
+
type: String
|
|
31
|
+
},
|
|
32
|
+
doc_collection: {
|
|
33
|
+
type: String
|
|
34
|
+
},
|
|
35
|
+
duration: {
|
|
36
|
+
type: Number
|
|
37
|
+
},
|
|
38
|
+
query: {
|
|
39
|
+
type: Object,
|
|
40
|
+
blackbox: true
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
44
|
+
skipVersioning: true,
|
|
45
|
+
versionKey: false,
|
|
46
|
+
timestamps: true
|
|
47
|
+
});
|
|
48
|
+
DefaultSchema.index({ date: 1 });
|
|
49
|
+
DefaultSchema.index({ client: 1, date: 1, method: 1 });
|
|
50
|
+
exports.MonitorMongos = index_1.ResolveIOServer.getMainDB().model('monitor-mongos', DefaultSchema);
|
|
51
|
+
exports.MonitorMongos['simplschema'] = new simpl_schema_1.default(schema);
|
|
52
|
+
schema._id = {
|
|
53
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
54
|
+
};
|
|
55
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
56
|
+
skipVersioning: true,
|
|
57
|
+
versionKey: false,
|
|
58
|
+
timestamps: true
|
|
59
|
+
});
|
|
60
|
+
exports.MonitorMongos['versionCollection'] = 'monitor-cpus.versions';
|
|
61
|
+
exports.MonitorMongoVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMongos['versionCollection'], VersionSchema);
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=monitor-mongo.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/monitor-mongo.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ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AAC,EAAE,aAAa,CAAC,CAAC","file":"monitor-mongo.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorMongoModel } from '../models/monitor-mongo.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tdoc_collection: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tquery: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({date: 1});\nDefaultSchema.index({client: 1, date: 1, method: 1});\n\ninterface ResolveIOModel extends MonitorMongoModel, Document {}\nexport const MonitorMongos: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-mongos', DefaultSchema);\n\nMonitorMongos['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorMongos['versionCollection'] = 'monitor-cpus.versions';\n\nexport const MonitorMongoVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorMongos['versionCollection'], VersionSchema);"]}
|
|
@@ -22,13 +22,6 @@ var schema = {
|
|
|
22
22
|
type: Date,
|
|
23
23
|
optional: true
|
|
24
24
|
},
|
|
25
|
-
readonly: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
optional: true
|
|
28
|
-
},
|
|
29
|
-
active: {
|
|
30
|
-
type: Boolean
|
|
31
|
-
},
|
|
32
25
|
attempts: {
|
|
33
26
|
type: Number,
|
|
34
27
|
optional: true
|
|
@@ -65,53 +58,67 @@ var schema = {
|
|
|
65
58
|
type: String
|
|
66
59
|
},
|
|
67
60
|
roles: {
|
|
61
|
+
type: Object
|
|
62
|
+
},
|
|
63
|
+
'roles.super_admin': {
|
|
64
|
+
type: Boolean
|
|
65
|
+
},
|
|
66
|
+
'roles.approvals': {
|
|
68
67
|
type: Array
|
|
69
68
|
},
|
|
70
|
-
'roles.$': {
|
|
69
|
+
'roles.approvals.$': {
|
|
70
|
+
type: Object
|
|
71
|
+
},
|
|
72
|
+
'roles.approvals.$.name': {
|
|
71
73
|
type: String
|
|
72
74
|
},
|
|
73
|
-
|
|
74
|
-
type: String
|
|
75
|
-
optional: true
|
|
75
|
+
'roles.approvals.$.type': {
|
|
76
|
+
type: String
|
|
76
77
|
},
|
|
77
|
-
|
|
78
|
-
type:
|
|
79
|
-
blackbox: true,
|
|
80
|
-
optional: true
|
|
78
|
+
'roles.approvals.$.accounting_code': {
|
|
79
|
+
type: String
|
|
81
80
|
},
|
|
82
|
-
|
|
83
|
-
type: Array
|
|
84
|
-
optional: true
|
|
81
|
+
'roles.groups': {
|
|
82
|
+
type: Array
|
|
85
83
|
},
|
|
86
|
-
'
|
|
84
|
+
'roles.groups.$': {
|
|
87
85
|
type: Object
|
|
88
86
|
},
|
|
89
|
-
'
|
|
87
|
+
'roles.groups.$.name': {
|
|
90
88
|
type: String
|
|
91
89
|
},
|
|
92
|
-
'
|
|
93
|
-
type:
|
|
90
|
+
'roles.groups.$.views': {
|
|
91
|
+
type: Array
|
|
94
92
|
},
|
|
95
|
-
'
|
|
93
|
+
'roles.groups.$.views.$': {
|
|
96
94
|
type: String
|
|
97
95
|
},
|
|
98
|
-
'
|
|
99
|
-
type: String
|
|
96
|
+
'roles.groups.$.yard': {
|
|
97
|
+
type: String,
|
|
98
|
+
optional: true
|
|
99
|
+
},
|
|
100
|
+
'roles.notifications': {
|
|
101
|
+
type: Array
|
|
100
102
|
},
|
|
101
|
-
'
|
|
103
|
+
'roles.notifications.$': {
|
|
102
104
|
type: String
|
|
103
105
|
},
|
|
104
|
-
'
|
|
105
|
-
type:
|
|
106
|
+
'roles.miscs': {
|
|
107
|
+
type: Array
|
|
106
108
|
},
|
|
107
|
-
'
|
|
108
|
-
type:
|
|
109
|
-
optional: true
|
|
109
|
+
'roles.miscs.$': {
|
|
110
|
+
type: String
|
|
110
111
|
},
|
|
111
|
-
|
|
112
|
+
active: Boolean,
|
|
113
|
+
phonenumber: {
|
|
112
114
|
type: String,
|
|
113
115
|
optional: true
|
|
114
116
|
},
|
|
117
|
+
other: {
|
|
118
|
+
type: Object,
|
|
119
|
+
optional: true,
|
|
120
|
+
blackbox: true
|
|
121
|
+
},
|
|
115
122
|
customers: {
|
|
116
123
|
type: Array,
|
|
117
124
|
optional: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/user.collection.ts"],"names":[],"mappings":";;AAAA,qCAAwG;AACxG,+DAAiE;AACjE,6CAAwC;AACxC,kCAA2C;AAG3C,uEAA8E;AAE9E,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,
|
|
1
|
+
{"version":3,"sources":["../../src/collections/user.collection.ts"],"names":[],"mappings":";;AAAA,qCAAwG;AACxG,+DAAiE;AACjE,6CAAwC;AACxC,kCAA2C;AAG3C,uEAA8E;AAE9E,IAAI,MAAM,GAA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EAAE,aAAa,CAAC,CAAC;AAEhI,qCAAqC;AACrC,IAAI,SAAS,GAAmB,EAAE,CAAC;AAEnC,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,sCAAc,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC;AACnF,aAAK,CAAC,UAAU,CAAC,GAAG,qCAAa,CAAC,QAAQ,CAAC,CAAC","file":"user.collection.js","sourcesContent":["import { Schema, Model, PassportLocalDocument, PassportLocalModel, PassportLocalSchema} from 'mongoose';\nimport * as passportLocalMongoose from 'passport-local-mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { UserModel } from '../models/user.model';\nimport { LookupTables } from '../models/report-builder.model';\nimport { buildRbSchema, buildRbLookups } from '../util/schema-report-builder';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tattempts: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tlast: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tservices: {\n\t\ttype: Object,\n\t\toptional: true\n\t},\n\t'services.enrollment': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'services.forgot_password': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'services.reset_password': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tusername: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\temail: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tfullname: {\n\t\ttype: String\n\t},\n\troles: {\n\t\ttype: Object\n\t},\n\t'roles.super_admin': {\n\t\ttype: Boolean\n\t},\n\t'roles.approvals': {\n\t\ttype: Array\n\t},\n\t'roles.approvals.$': {\n\t\ttype: Object\n\t},\n\t'roles.approvals.$.name': {\n\t\ttype: String\n\t},\n\t'roles.approvals.$.type': {\n\t\ttype: String\n\t},\n\t'roles.approvals.$.accounting_code': {\n\t\ttype: String\n\t},\n\t'roles.groups': {\n\t\ttype: Array\n\t},\n\t'roles.groups.$': {\n\t\ttype: Object\n\t},\n\t'roles.groups.$.name': {\n\t\ttype: String\n\t},\n\t'roles.groups.$.views': {\n\t\ttype: Array\n\t},\n\t'roles.groups.$.views.$': {\n\t\ttype: String\n\t},\n\t'roles.groups.$.yard': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'roles.notifications': {\n\t\ttype: Array\n\t},\n\t'roles.notifications.$': {\n\t\ttype: String\n\t},\n\t'roles.miscs': {\n\t\ttype: Array\n\t},\n\t'roles.miscs.$': {\n\t\ttype: String\n\t},\n\tactive: Boolean,\n\tphonenumber: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tother: {\n\t\ttype: Object,\n\t\toptional: true,\n\t\tblackbox: true\n\t},\n\tcustomers: {\n\t\ttype: Array,\n\t\toptional: true,\n\t},\n\t'customers.$': {\n\t\ttype: Object\n\t},\n\t'customers.$.id_customer': {\n\t\ttype: String\n\t},\n\t'customers.$.customer': {\n\t\ttype: String\n\t},\n\tid_customer: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tcustomer: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tcustomer_type: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tdepartments: {\n\t\ttype: Array,\n\t\toptional: true\n\t},\n\t'departments.$': {\n\t\ttype: Object\n\t},\n\t'departments.$.id_department': {\n\t\ttype: String\n\t},\n\t'departments.$.department': {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = <PassportLocalSchema>new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.plugin(passportLocalMongoose, {\n\tusernameUnique: true,\n\tlimitAttempts: true,\n\tmaxAttempts: 5,\n\tfindByUsername: (mongooseModel, queryParameters) => {\n\t\t// Add additional query parameter - AND condition - active: true\n\t\tqueryParameters.active = true;\n\t\treturn mongooseModel.findOne(queryParameters);\n\t}\n});\n\ninterface ResolveIOModel extends UserModel, PassportLocalDocument {}\nexport const Users: PassportLocalModel<ResolveIOModel> = (<any>ResolveIOServer.getMainDB()).model('users', DefaultSchema);\n\nUsers['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nVersionSchema.index({'_id.__v': 1, '_id._id': 1});\n\nUsers['versionCollection'] = 'users.versions';\n\nexport const UserVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(Users['versionCollection'], VersionSchema);\n\n//------------- Report Builder Schema\nlet rbLookups: LookupTables[] = [];\n\nlet rbSchema = Object.assign(schema, buildRbLookups(rbLookups, DefaultSchema, []));\nUsers['rbSchema'] = buildRbSchema(rbSchema);"]}
|
package/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as mongoose from 'mongoose';
|
|
2
2
|
import ResolveIOMainServer from './server-app';
|
|
3
3
|
export declare class ResolveIOServer {
|
|
4
|
+
private static _monitorAgent;
|
|
4
5
|
private static _serverConfig;
|
|
5
6
|
private static _mainDB;
|
|
6
7
|
private static _mainServer;
|
|
7
8
|
private static _client;
|
|
8
9
|
private static _clientDir;
|
|
9
10
|
private static _sesMail;
|
|
10
|
-
constructor(serverConfig: any, client: string, clientDir: any, sesMail?: boolean);
|
|
11
|
+
constructor(monitoring: any, serverConfig: any, client: string, clientDir: any, sesMail?: boolean);
|
|
11
12
|
static connectAndRun(): Promise<unknown>;
|
|
12
13
|
static getClientName(): string;
|
|
13
14
|
static getMainServer(): ResolveIOMainServer;
|