@resolveio/server-lib 8.1.35 → 9.0.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/collections/app-status.collection.d.ts +2 -6
- package/collections/app-status.collection.js +4 -21
- package/collections/app-status.collection.js.map +1 -1
- package/collections/app-version.collection.d.ts +2 -6
- package/collections/app-version.collection.js +4 -34
- package/collections/app-version.collection.js.map +1 -1
- package/collections/counter.collection.d.ts +2 -6
- package/collections/counter.collection.js +4 -34
- package/collections/counter.collection.js.map +1 -1
- package/collections/cron-job-history.collection.d.ts +3 -7
- package/collections/cron-job-history.collection.js +5 -34
- package/collections/cron-job-history.collection.js.map +1 -1
- package/collections/cron-job.collection.d.ts +2 -6
- package/collections/cron-job.collection.js +4 -33
- package/collections/cron-job.collection.js.map +1 -1
- package/collections/email-history.collection.d.ts +2 -6
- package/collections/email-history.collection.js +4 -21
- package/collections/email-history.collection.js.map +1 -1
- package/collections/email-verified.collection.d.ts +2 -6
- package/collections/email-verified.collection.js +5 -22
- package/collections/email-verified.collection.js.map +1 -1
- package/collections/file.collection.d.ts +2 -6
- package/collections/file.collection.js +4 -26
- package/collections/file.collection.js.map +1 -1
- package/collections/flag.collection.d.ts +2 -6
- package/collections/flag.collection.js +4 -21
- package/collections/flag.collection.js.map +1 -1
- package/collections/log-method-latency.collection.d.ts +2 -6
- package/collections/log-method-latency.collection.js +7 -22
- package/collections/log-method-latency.collection.js.map +1 -1
- package/collections/log-subscription.collection.d.ts +2 -6
- package/collections/log-subscription.collection.js +9 -24
- package/collections/log-subscription.collection.js.map +1 -1
- package/collections/log.collection.d.ts +2 -6
- package/collections/log.collection.js +9 -25
- package/collections/log.collection.js.map +1 -1
- package/collections/logged-in-users.collection.d.ts +2 -6
- package/collections/logged-in-users.collection.js +5 -32
- package/collections/logged-in-users.collection.js.map +1 -1
- package/collections/method-call.collection.d.ts +2 -5
- package/collections/method-call.collection.js +5 -11
- package/collections/method-call.collection.js.map +1 -1
- package/collections/method-response.collection.d.ts +2 -5
- package/collections/method-response.collection.js +5 -11
- package/collections/method-response.collection.js.map +1 -1
- package/collections/monitor-cpu.collection.d.ts +2 -6
- package/collections/monitor-cpu.collection.js +9 -26
- package/collections/monitor-cpu.collection.js.map +1 -1
- package/collections/monitor-https-inbound.collection.d.ts +2 -6
- package/collections/monitor-https-inbound.collection.js +9 -26
- package/collections/monitor-https-inbound.collection.js.map +1 -1
- package/collections/monitor-https-outbound.collection.d.ts +2 -6
- package/collections/monitor-https-outbound.collection.js +11 -28
- package/collections/monitor-https-outbound.collection.js.map +1 -1
- package/collections/monitor-memory.collection.d.ts +2 -6
- package/collections/monitor-memory.collection.js +8 -25
- package/collections/monitor-memory.collection.js.map +1 -1
- package/collections/monitor-mongo.collection.d.ts +2 -6
- package/collections/monitor-mongo.collection.js +8 -25
- package/collections/monitor-mongo.collection.js.map +1 -1
- package/collections/notification.collection.d.ts +2 -6
- package/collections/notification.collection.js +4 -21
- package/collections/notification.collection.js.map +1 -1
- package/collections/queue-flag.collection.d.ts +2 -6
- package/collections/queue-flag.collection.js +5 -22
- package/collections/queue-flag.collection.js.map +1 -1
- package/collections/queue-method.collection.d.ts +2 -6
- package/collections/queue-method.collection.js +6 -77
- package/collections/queue-method.collection.js.map +1 -1
- package/collections/queue-response.collection.d.ts +2 -6
- package/collections/queue-response.collection.js +5 -34
- package/collections/queue-response.collection.js.map +1 -1
- package/collections/report-builder-dashboard-builder.collection.d.ts +2 -6
- package/collections/report-builder-dashboard-builder.collection.js +6 -35
- package/collections/report-builder-dashboard-builder.collection.js.map +1 -1
- package/collections/report-builder-library.collection.d.ts +2 -6
- package/collections/report-builder-library.collection.js +7 -36
- package/collections/report-builder-library.collection.js.map +1 -1
- package/collections/report-builder-report.collection.d.ts +2 -6
- package/collections/report-builder-report.collection.js +7 -36
- package/collections/report-builder-report.collection.js.map +1 -1
- package/collections/user-group.collection.d.ts +3 -6
- package/collections/user-group.collection.js +5 -38
- package/collections/user-group.collection.js.map +1 -1
- package/collections/user-guide.collection.d.ts +2 -6
- package/collections/user-guide.collection.js +4 -26
- package/collections/user-guide.collection.js.map +1 -1
- package/collections/user.collection.d.ts +3 -6
- package/collections/user.collection.js +36 -62
- package/collections/user.collection.js.map +1 -1
- package/fixtures/cron-jobs.js +5 -5
- package/fixtures/cron-jobs.js.map +1 -1
- package/fixtures/init.js +2 -2
- package/fixtures/init.js.map +1 -1
- package/http/auth.js +201 -185
- package/http/auth.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +5 -6
- package/index.js.map +1 -1
- package/managers/cron.manager.js +6 -6
- package/managers/cron.manager.js.map +1 -1
- package/managers/method.manager.js +10 -10
- package/managers/method.manager.js.map +1 -1
- package/managers/mongo.manager.d.ts +102 -0
- package/managers/mongo.manager.js +514 -0
- package/managers/mongo.manager.js.map +1 -0
- package/managers/monitor.manager.js +56 -9
- package/managers/monitor.manager.js.map +1 -1
- package/managers/queue-method.manager.js +14 -14
- package/managers/queue-method.manager.js.map +1 -1
- package/managers/subscription.manager.js +9 -7
- package/managers/subscription.manager.js.map +1 -1
- package/methods/accounts.js +23 -21
- package/methods/accounts.js.map +1 -1
- package/methods/aws.js +7 -7
- package/methods/aws.js.map +1 -1
- package/methods/collections.js +112 -119
- package/methods/collections.js.map +1 -1
- package/methods/counters.js +5 -5
- package/methods/counters.js.map +1 -1
- package/methods/cron-jobs.js +2 -2
- package/methods/cron-jobs.js.map +1 -1
- package/methods/logs.js +8 -8
- package/methods/logs.js.map +1 -1
- package/methods/monitor.js +6 -6
- package/methods/monitor.js.map +1 -1
- package/methods/pdf.js +5 -5
- package/methods/pdf.js.map +1 -1
- package/methods/report-builder.js +2 -2
- package/methods/report-builder.js.map +1 -1
- package/models/report-builder.model.d.ts +1 -2
- package/models/report-builder.model.js.map +1 -1
- package/models/user.model.d.ts +9 -7
- package/models/user.model.js.map +1 -1
- package/package.json +26 -27
- package/public_api.js +1 -1
- package/publications/app-status.js +1 -1
- package/publications/app-status.js.map +1 -1
- package/publications/app-version.js +1 -1
- package/publications/app-version.js.map +1 -1
- package/publications/cron-jobs.js +2 -2
- package/publications/cron-jobs.js.map +1 -1
- package/publications/files.js +3 -3
- package/publications/files.js.map +1 -1
- package/publications/flags.js +1 -1
- package/publications/flags.js.map +1 -1
- package/publications/logs.js +3 -3
- package/publications/logs.js.map +1 -1
- package/publications/method-calls.js +1 -1
- package/publications/method-calls.js.map +1 -1
- package/publications/method-responses.js +1 -1
- package/publications/method-responses.js.map +1 -1
- package/publications/notifications.js +1 -1
- package/publications/notifications.js.map +1 -1
- package/publications/report-builder-dashboard-builders.js +2 -2
- package/publications/report-builder-dashboard-builders.js.map +1 -1
- package/publications/report-builder-libraries.js +3 -3
- package/publications/report-builder-libraries.js.map +1 -1
- package/publications/report-builder-reports.js +4 -4
- package/publications/report-builder-reports.js.map +1 -1
- package/publications/super-admin.js +1 -1
- package/publications/super-admin.js.map +1 -1
- package/publications/user-groups.js +1 -1
- package/publications/user-groups.js.map +1 -1
- package/publications/user-guides.js +1 -1
- package/publications/user-guides.js.map +1 -1
- package/server-app.d.ts +4 -1
- package/server-app.js +19 -28
- package/server-app.js.map +1 -1
- package/util/common.d.ts +2 -3
- package/util/common.js +16 -21
- package/util/common.js.map +1 -1
- package/util/schema-report-builder.js +5 -5
- package/util/schema-report-builder.js.map +1 -1
- package/managers/database.manager.d.ts +0 -6
- package/managers/database.manager.js +0 -15
- package/managers/database.manager.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/file.collection.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/collections/file.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAK9D,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,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAES,QAAA,KAAK,GAA0B,IAAI,CAAC;AAE/C,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAY,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACrE,aAAK,GAAG,KAAK,CAAC,eAAe,CAAC;KAC9B;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"file.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { FileModel } from '../models/file.model';\nimport { LookupTables } from '../models/report-builder.model';\nimport { buildRbSchema, buildRbLookups } from '../util/common';\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\tname: {\n\t\ttype: String\n\t},\n\tsize: {\n\t\ttype: Number\n\t},\n\tkey: {\n\t\ttype: String\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\torder: {\n\t\ttype: Number\n\t},\n\tstatus: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tdefault: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t}\n};\n\nexport let Files: Collection<FileModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<FileModel>('files', schema, false, true, []);\n\t\tFiles = model.collection_main;\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from '../managers/mongo.manager';
|
|
2
2
|
import { FlagModel } from '../models/flag.model';
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare let Flags: Model<ResolveIOModel>;
|
|
6
|
-
export declare let FlagVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
3
|
+
export declare let Flags: Collection<FlagModel>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var mongoose_1 = require("mongoose");
|
|
5
|
-
var simpl_schema_1 = require("simpl-schema");
|
|
3
|
+
exports.Flags = void 0;
|
|
6
4
|
var index_1 = require("../index");
|
|
5
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
7
6
|
var schema = {
|
|
8
7
|
_id: {
|
|
9
8
|
type: String,
|
|
@@ -29,28 +28,12 @@ var schema = {
|
|
|
29
28
|
optional: true
|
|
30
29
|
}
|
|
31
30
|
};
|
|
32
|
-
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
33
|
-
skipVersioning: true,
|
|
34
|
-
versionKey: false,
|
|
35
|
-
timestamps: true
|
|
36
|
-
});
|
|
37
31
|
exports.Flags = null;
|
|
38
|
-
exports.FlagVersions = null;
|
|
39
32
|
initializeCollection();
|
|
40
33
|
function initializeCollection() {
|
|
41
34
|
if (index_1.ResolveIOServer.getMainDB()) {
|
|
42
|
-
|
|
43
|
-
exports.Flags
|
|
44
|
-
schema._id = {
|
|
45
|
-
type: mongoose_1.Schema.Types.Mixed
|
|
46
|
-
};
|
|
47
|
-
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
48
|
-
skipVersioning: true,
|
|
49
|
-
versionKey: false,
|
|
50
|
-
timestamps: true
|
|
51
|
-
});
|
|
52
|
-
exports.Flags['versionCollection'] = 'flags.versions';
|
|
53
|
-
exports.FlagVersions = index_1.ResolveIOServer.getMainDB().model(exports.Flags['versionCollection'], VersionSchema);
|
|
35
|
+
var model = new mongo_manager_1.Model('flags', schema, false, false);
|
|
36
|
+
exports.Flags = model.collection_main;
|
|
54
37
|
}
|
|
55
38
|
else {
|
|
56
39
|
setTimeout(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/flag.collection.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/collections/flag.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAES,QAAA,KAAK,GAA0B,IAAI,CAAC;AAE/C,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAY,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAClE,aAAK,GAAG,KAAK,CAAC,eAAe,CAAC;KAC9B;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"flag.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { FlagModel } from '../models/flag.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\ttype: {\n\t\ttype: String\n\t},\n\tvalue: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t}\n};\n\nexport let Flags: Collection<FlagModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<FlagModel>('flags', schema, false, false);\n\t\tFlags = model.collection_main;\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from '../managers/mongo.manager';
|
|
2
2
|
import { LogMethodLatencyModel } from '../models/log-method-latency.model';
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare let LogMethodLatencies: Model<ResolveIOModel>;
|
|
6
|
-
export declare let LogMethodLatencyVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
3
|
+
export declare let LogMethodLatencies: Collection<LogMethodLatencyModel>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var mongoose_1 = require("mongoose");
|
|
3
|
+
exports.LogMethodLatencies = void 0;
|
|
5
4
|
var index_1 = require("../index");
|
|
5
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
6
|
var schema = {
|
|
7
7
|
_id: {
|
|
8
8
|
type: String,
|
|
@@ -34,30 +34,15 @@ var schema = {
|
|
|
34
34
|
type: String
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
38
|
-
skipVersioning: true,
|
|
39
|
-
versionKey: false,
|
|
40
|
-
timestamps: true
|
|
41
|
-
});
|
|
42
|
-
DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
43
|
-
DefaultSchema.index({ latency_ms: 1 });
|
|
44
|
-
DefaultSchema.index({ method: 1 });
|
|
45
37
|
exports.LogMethodLatencies = null;
|
|
46
|
-
exports.LogMethodLatencyVersions = null;
|
|
47
38
|
initializeCollection();
|
|
48
39
|
function initializeCollection() {
|
|
49
40
|
if (index_1.ResolveIOServer.getMainDB()) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
skipVersioning: true,
|
|
56
|
-
versionKey: false,
|
|
57
|
-
timestamps: true
|
|
58
|
-
});
|
|
59
|
-
exports.LogMethodLatencies['versionCollection'] = 'log-method-latencies.versions';
|
|
60
|
-
exports.LogMethodLatencyVersions = index_1.ResolveIOServer.getMainDB().model(exports.LogMethodLatencies['versionCollection'], VersionSchema);
|
|
41
|
+
var model = new mongo_manager_1.Model('log-method-latencies', schema, false, false);
|
|
42
|
+
exports.LogMethodLatencies = model.collection_main;
|
|
43
|
+
exports.LogMethodLatencies.createIndex({ createdAt: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
44
|
+
exports.LogMethodLatencies.createIndex({ latency_ms: 1 });
|
|
45
|
+
exports.LogMethodLatencies.createIndex({ method: 1 });
|
|
61
46
|
}
|
|
62
47
|
else {
|
|
63
48
|
setTimeout(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/log-method-latency.collection.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/collections/log-method-latency.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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,UAAU,EAAE;QACX,IAAI,EAAE,IAAI;KACV;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAES,QAAA,kBAAkB,GAAsC,IAAI,CAAC;AAExE,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAwB,sBAAsB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAC7F,0BAAkB,GAAG,KAAK,CAAC,eAAe,CAAC;QAC3C,0BAAkB,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QACxF,0BAAkB,CAAC,WAAW,CAAC,EAAC,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;QAChD,0BAAkB,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;KAC5C;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log-method-latency.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { LogMethodLatencyModel } from '../models/log-method-latency.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\tdate_start: {\n\t\ttype: Date\n\t},\n\tdate_end: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tlatency_ms: {\n\t\ttype: Number\n\t},\n\tmethod: {\n\t\ttype: String\n\t}\n};\n\nexport let LogMethodLatencies: Collection<LogMethodLatencyModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<LogMethodLatencyModel>('log-method-latencies', schema, false, false);\n\t\tLogMethodLatencies = model.collection_main;\n\t\tLogMethodLatencies.createIndex({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tLogMethodLatencies.createIndex({latency_ms: 1});\n\t\tLogMethodLatencies.createIndex({method: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from '../managers/mongo.manager';
|
|
2
2
|
import { LogSubscriptionModel } from '../models/log-subscription.model';
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare let LogSubscriptions: Model<ResolveIOModel>;
|
|
6
|
-
export declare let LogSubscriptionVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
3
|
+
export declare let LogSubscriptions: Collection<LogSubscriptionModel>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var mongoose_1 = require("mongoose");
|
|
3
|
+
exports.LogSubscriptions = void 0;
|
|
5
4
|
var index_1 = require("../index");
|
|
5
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
6
|
var schema = {
|
|
7
7
|
_id: {
|
|
8
8
|
type: String,
|
|
@@ -40,32 +40,17 @@ var schema = {
|
|
|
40
40
|
blackbox: true
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
44
|
-
skipVersioning: true,
|
|
45
|
-
versionKey: false,
|
|
46
|
-
timestamps: true
|
|
47
|
-
});
|
|
48
|
-
DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
49
|
-
DefaultSchema.index({ type: 1 });
|
|
50
|
-
DefaultSchema.index({ collection_name: 1 });
|
|
51
|
-
DefaultSchema.index({ date: 1, type: 1 });
|
|
52
|
-
DefaultSchema.index({ createdAt: 1 });
|
|
53
43
|
exports.LogSubscriptions = null;
|
|
54
|
-
exports.LogSubscriptionVersions = null;
|
|
55
44
|
initializeCollection();
|
|
56
45
|
function initializeCollection() {
|
|
57
46
|
if (index_1.ResolveIOServer.getMainDB()) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
timestamps: true
|
|
66
|
-
});
|
|
67
|
-
exports.LogSubscriptions['versionCollection'] = 'log-subscriptions.versions';
|
|
68
|
-
exports.LogSubscriptionVersions = index_1.ResolveIOServer.getMainDB().model(exports.LogSubscriptions['versionCollection'], VersionSchema);
|
|
47
|
+
var model = new mongo_manager_1.Model('log-subscriptions', schema, false, false);
|
|
48
|
+
exports.LogSubscriptions = model.collection_main;
|
|
49
|
+
exports.LogSubscriptions.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
50
|
+
exports.LogSubscriptions.createIndex({ type: 1 });
|
|
51
|
+
exports.LogSubscriptions.createIndex({ collection_name: 1 });
|
|
52
|
+
exports.LogSubscriptions.createIndex({ date: 1, type: 1 });
|
|
53
|
+
exports.LogSubscriptions.createIndex({ createdAt: 1 });
|
|
69
54
|
}
|
|
70
55
|
else {
|
|
71
56
|
setTimeout(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/log-subscription.collection.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/collections/log-subscription.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,YAAY,EAAE;QACb,IAAI,EAAE,MAAM;KACZ;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,KAAK;KACX;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAES,QAAA,gBAAgB,GAAqC,IAAI,CAAC;AAErE,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAuB,mBAAmB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACzF,wBAAgB,GAAG,KAAK,CAAC,eAAe,CAAC;QACzC,wBAAgB,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QACjF,wBAAgB,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QACxC,wBAAgB,CAAC,WAAW,CAAC,EAAC,eAAe,EAAE,CAAC,EAAC,CAAC,CAAC;QACnD,wBAAgB,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QACjD,wBAAgB,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,CAAC,CAAC;KAC7C;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log-subscription.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { LogSubscriptionModel } from '../models/log-subscription.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\tdate: {\n\t\ttype: Date\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tsubscription: {\n\t\ttype: String\n\t},\n\tcollection_name: {\n\t\ttype: String\n\t},\n\tsubData: {\n\t\ttype: Array\t\n\t},\n\t'subData.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t}\n};\n\nexport let LogSubscriptions: Collection<LogSubscriptionModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<LogSubscriptionModel>('log-subscriptions', schema, false, false);\n\t\tLogSubscriptions = model.collection_main;\n\t\tLogSubscriptions.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tLogSubscriptions.createIndex({type: 1});\n\t\tLogSubscriptions.createIndex({collection_name: 1});\n\t\tLogSubscriptions.createIndex({date: 1, type: 1});\n\t\tLogSubscriptions.createIndex({createdAt: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from '../managers/mongo.manager';
|
|
2
2
|
import { LogModel } from '../models/log.model';
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare let Logs: Model<ResolveIOModel>;
|
|
6
|
-
export declare let LogVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
3
|
+
export declare let Logs: Collection<LogModel>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var mongoose_1 = require("mongoose");
|
|
3
|
+
exports.Logs = void 0;
|
|
5
4
|
var index_1 = require("../index");
|
|
5
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
6
|
var schema = {
|
|
7
7
|
_id: {
|
|
8
8
|
type: String,
|
|
@@ -56,33 +56,17 @@ var schema = {
|
|
|
56
56
|
optional: true
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
60
|
-
skipVersioning: true,
|
|
61
|
-
versionKey: false,
|
|
62
|
-
timestamps: true
|
|
63
|
-
});
|
|
64
|
-
DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
65
|
-
DefaultSchema.index({ type: 1 });
|
|
66
|
-
DefaultSchema.index({ type: 1, date: 1 });
|
|
67
|
-
DefaultSchema.index({ user: 1, date: 1 });
|
|
68
|
-
DefaultSchema.index({ user: 1, type: 1, date: 1 });
|
|
69
|
-
DefaultSchema.index({ method: 1, date: 1 });
|
|
70
59
|
exports.Logs = null;
|
|
71
|
-
exports.LogVersions = null;
|
|
72
60
|
initializeCollection();
|
|
73
61
|
function initializeCollection() {
|
|
74
62
|
if (index_1.ResolveIOServer.getMainDB()) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
timestamps: true
|
|
83
|
-
});
|
|
84
|
-
exports.Logs['versionCollection'] = 'logs.versions';
|
|
85
|
-
exports.LogVersions = index_1.ResolveIOServer.getMainDB().model(exports.Logs['versionCollection'], VersionSchema);
|
|
63
|
+
var model = new mongo_manager_1.Model('logs', schema, false, false);
|
|
64
|
+
exports.Logs = model.collection_main;
|
|
65
|
+
exports.Logs.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
66
|
+
exports.Logs.createIndex({ type: 1, date: 1 });
|
|
67
|
+
exports.Logs.createIndex({ user: 1, date: 1 });
|
|
68
|
+
exports.Logs.createIndex({ user: 1, type: 1, date: 1 });
|
|
69
|
+
exports.Logs.createIndex({ method: 1, date: 1 });
|
|
86
70
|
}
|
|
87
71
|
else {
|
|
88
72
|
setTimeout(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/log.collection.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/collections/log.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,SAAS,EAAE;QACV,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAES,QAAA,IAAI,GAAyB,IAAI,CAAC;AAE7C,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAW,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAChE,YAAI,GAAG,KAAK,CAAC,eAAe,CAAC;QAC7B,YAAI,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QACrE,YAAI,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QACrC,YAAI,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QACrC,YAAI,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QAC9C,YAAI,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;KACvC;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { LogModel } from '../models/log.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\tdate: {\n\t\ttype: Date\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\ttitle: {\n\t\ttype: String\n\t},\n\tmessage: {\n\t\ttype: String\n\t},\n\tpayload: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: String\n\t},\n\troute: {\n\t\ttype: String\n\t},\n\tdata_0: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tdata_1: {\n\t\ttype: String,\n\t\toptional: true\n\t}\n};\n\nexport let Logs: Collection<LogModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<LogModel>('logs', schema, false, false);\n\t\tLogs = model.collection_main;\n\t\tLogs.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tLogs.createIndex({type: 1, date: 1});\n\t\tLogs.createIndex({user: 1, date: 1});\n\t\tLogs.createIndex({user: 1, type: 1, date: 1});\n\t\tLogs.createIndex({method: 1, date: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from '../managers/mongo.manager';
|
|
2
2
|
import { LoggedInUserModel } from '../models/logged-in-users.model';
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare let LoggedInUsers: Model<ResolveIOModel>;
|
|
6
|
-
export declare let LoggedInUserVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
3
|
+
export declare let LoggedInUsers: Collection<LoggedInUserModel>;
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
15
|
-
var mongoose_1 = require("mongoose");
|
|
3
|
+
exports.LoggedInUsers = void 0;
|
|
16
4
|
var index_1 = require("../index");
|
|
5
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
17
6
|
var schema = {
|
|
18
7
|
_id: {
|
|
19
8
|
type: String,
|
|
@@ -52,29 +41,13 @@ var schema = {
|
|
|
52
41
|
optional: true
|
|
53
42
|
}
|
|
54
43
|
};
|
|
55
|
-
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
56
|
-
skipVersioning: true,
|
|
57
|
-
versionKey: false,
|
|
58
|
-
timestamps: true
|
|
59
|
-
});
|
|
60
|
-
DefaultSchema.index({ id_ws: 1 });
|
|
61
44
|
exports.LoggedInUsers = null;
|
|
62
|
-
exports.LoggedInUserVersions = null;
|
|
63
45
|
initializeCollection();
|
|
64
46
|
function initializeCollection() {
|
|
65
47
|
if (index_1.ResolveIOServer.getMainDB()) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
type: mongoose_1.Schema.Types.Mixed
|
|
70
|
-
};
|
|
71
|
-
var VersionSchema = new mongoose_1.Schema(vSchema, {
|
|
72
|
-
skipVersioning: true,
|
|
73
|
-
versionKey: false,
|
|
74
|
-
timestamps: true
|
|
75
|
-
});
|
|
76
|
-
exports.LoggedInUsers['versionCollection'] = 'logged-in-users.versions';
|
|
77
|
-
exports.LoggedInUserVersions = index_1.ResolveIOServer.getMainDB().model(exports.LoggedInUsers['versionCollection'], VersionSchema);
|
|
48
|
+
var model = new mongo_manager_1.Model('logged-in-users', schema, false, false);
|
|
49
|
+
exports.LoggedInUsers = model.collection_main;
|
|
50
|
+
exports.LoggedInUsers.createIndex({ id_ws: 1 });
|
|
78
51
|
}
|
|
79
52
|
else {
|
|
80
53
|
setTimeout(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/logged-in-users.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/logged-in-users.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAES,QAAA,aAAa,GAAkC,IAAI,CAAC;AAE/D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAoB,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACpF,qBAAa,GAAG,KAAK,CAAC,eAAe,CAAC;QACtC,qBAAa,CAAC,WAAW,CAAC,EAAC,KAAK,EAAE,CAAC,EAAC,CAAC,CAAC;KACtC;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"logged-in-users.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { LoggedInUserModel } from '../models/logged-in-users.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\tdate: {\n\t\ttype: Date\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tapp_version: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tlatency: {\n\t\ttype: Number,\n\t\toptional: true\n\t}\n};\n\nexport let LoggedInUsers: Collection<LoggedInUserModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<LoggedInUserModel>('logged-in-users', schema, false, false);\n\t\tLoggedInUsers = model.collection_main;\n\t\tLoggedInUsers.createIndex({id_ws: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from '../managers/mongo.manager';
|
|
2
2
|
import { MethodCallModel } from '../models/method-call.model';
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare let MethodCalls: Model<ResolveIOModel>;
|
|
6
|
-
export {};
|
|
3
|
+
export declare let MethodCalls: Collection<MethodCallModel>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MethodCalls = void 0;
|
|
4
|
-
var mongoose_1 = require("mongoose");
|
|
5
|
-
var simpl_schema_1 = require("simpl-schema");
|
|
6
4
|
var index_1 = require("../index");
|
|
5
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
7
6
|
var schema = {
|
|
8
7
|
_id: {
|
|
9
8
|
type: String,
|
|
@@ -34,19 +33,14 @@ var schema = {
|
|
|
34
33
|
type: Date
|
|
35
34
|
}
|
|
36
35
|
};
|
|
37
|
-
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
38
|
-
skipVersioning: true,
|
|
39
|
-
versionKey: false,
|
|
40
|
-
timestamps: true
|
|
41
|
-
});
|
|
42
|
-
DefaultSchema.index({ id_user: 1, message_id: 1 });
|
|
43
|
-
DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 86400 });
|
|
44
36
|
exports.MethodCalls = null;
|
|
45
37
|
initializeCollection();
|
|
46
38
|
function initializeCollection() {
|
|
47
39
|
if (index_1.ResolveIOServer.getMainDB()) {
|
|
48
|
-
|
|
49
|
-
exports.MethodCalls
|
|
40
|
+
var model = new mongo_manager_1.Model('method-calls', schema, false, false);
|
|
41
|
+
exports.MethodCalls = model.collection_main;
|
|
42
|
+
exports.MethodCalls.createIndex({ id_user: 1, message_id: 1 });
|
|
43
|
+
exports.MethodCalls.createIndex({ createdAt: 1 }, { expireAfterSeconds: 86400 });
|
|
50
44
|
}
|
|
51
45
|
else {
|
|
52
46
|
setTimeout(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/method-call.collection.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/collections/method-call.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;CACD,CAAC;AAES,QAAA,WAAW,GAAgC,IAAI,CAAC;AAE3D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAkB,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAC/E,mBAAW,GAAG,KAAK,CAAC,eAAe,CAAC;QACpC,mBAAW,CAAC,WAAW,CAAC,EAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;QACrD,mBAAW,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;KACrE;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"method-call.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MethodCallModel } from '../models/method-call.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\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t}\n};\n\nexport let MethodCalls: Collection<MethodCallModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MethodCallModel>('method-calls', schema, false, false);\n\t\tMethodCalls = model.collection_main;\n\t\tMethodCalls.createIndex({id_user: 1, message_id: 1});\n\t\tMethodCalls.createIndex({createdAt: 1}, {expireAfterSeconds: 86400});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from '../managers/mongo.manager';
|
|
2
2
|
import { MethodResponseModel } from '../models/method-response.model';
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare let MethodResponses: Model<ResolveIOModel>;
|
|
6
|
-
export {};
|
|
3
|
+
export declare let MethodResponses: Collection<MethodResponseModel>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MethodResponses = void 0;
|
|
4
|
-
var mongoose_1 = require("mongoose");
|
|
5
|
-
var simpl_schema_1 = require("simpl-schema");
|
|
6
4
|
var index_1 = require("../index");
|
|
5
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
7
6
|
var schema = {
|
|
8
7
|
_id: {
|
|
9
8
|
type: String,
|
|
@@ -38,19 +37,14 @@ var schema = {
|
|
|
38
37
|
type: Date
|
|
39
38
|
}
|
|
40
39
|
};
|
|
41
|
-
var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
42
|
-
skipVersioning: true,
|
|
43
|
-
versionKey: false,
|
|
44
|
-
timestamps: true
|
|
45
|
-
});
|
|
46
|
-
DefaultSchema.index({ id_user: 1, message_id: 1 });
|
|
47
|
-
DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 86400 });
|
|
48
40
|
exports.MethodResponses = null;
|
|
49
41
|
initializeCollection();
|
|
50
42
|
function initializeCollection() {
|
|
51
43
|
if (index_1.ResolveIOServer.getMainDB()) {
|
|
52
|
-
|
|
53
|
-
exports.MethodResponses
|
|
44
|
+
var model = new mongo_manager_1.Model('method-responses', schema, false, false);
|
|
45
|
+
exports.MethodResponses = model.collection_main;
|
|
46
|
+
exports.MethodResponses.createIndex({ id_user: 1, message_id: 1 });
|
|
47
|
+
exports.MethodResponses.createIndex({ createdAt: 1 }, { expireAfterSeconds: 86400 });
|
|
54
48
|
}
|
|
55
49
|
else {
|
|
56
50
|
setTimeout(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/method-response.collection.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/collections/method-response.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;CACD,CAAC;AAES,QAAA,eAAe,GAAoC,IAAI,CAAC;AAEnE,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAsB,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACvF,uBAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QACxC,uBAAe,CAAC,WAAW,CAAC,EAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;QACzD,uBAAe,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;KACzE;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"method-response.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MethodResponseModel } from '../models/method-response.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\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tresponse: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t}\n};\n\nexport let MethodResponses: Collection<MethodResponseModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MethodResponseModel>('method-responses', schema, false, false);\n\t\tMethodResponses = model.collection_main;\n\t\tMethodResponses.createIndex({id_user: 1, message_id: 1});\n\t\tMethodResponses.createIndex({createdAt: 1}, {expireAfterSeconds: 86400});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collection } from '../managers/mongo.manager';
|
|
2
2
|
import { MonitorCPUModel } from '../models/monitor-cpu.model';
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export declare let MonitorCPUs: Model<ResolveIOModel>;
|
|
6
|
-
export declare let MonitorCPUVersions: Model<ResolveIOModel>;
|
|
7
|
-
export {};
|
|
3
|
+
export declare let MonitorCPUs: Collection<MonitorCPUModel>;
|