@resolveio/server-lib 8.0.16 → 8.0.18
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 -2
- package/collections/app-status.collection.js +24 -12
- package/collections/app-status.collection.js.map +1 -1
- package/collections/app-version.collection.d.ts +2 -2
- package/collections/app-version.collection.js +26 -14
- package/collections/app-version.collection.js.map +1 -1
- package/collections/counter.collection.d.ts +2 -2
- package/collections/counter.collection.js +26 -14
- package/collections/counter.collection.js.map +1 -1
- package/collections/cron-job-history.collection.d.ts +2 -2
- package/collections/cron-job-history.collection.js +25 -13
- package/collections/cron-job-history.collection.js.map +1 -1
- package/collections/cron-job.collection.d.ts +2 -2
- package/collections/cron-job.collection.js +25 -13
- package/collections/cron-job.collection.js.map +1 -1
- package/collections/email-history.collection.d.ts +2 -2
- package/collections/email-history.collection.js +24 -12
- package/collections/email-history.collection.js.map +1 -1
- package/collections/email-verified.collection.d.ts +2 -2
- package/collections/email-verified.collection.js +24 -12
- package/collections/email-verified.collection.js.map +1 -1
- package/collections/file.collection.d.ts +2 -2
- package/collections/file.collection.js +28 -16
- package/collections/file.collection.js.map +1 -1
- package/collections/flag.collection.d.ts +2 -2
- package/collections/flag.collection.js +24 -12
- package/collections/flag.collection.js.map +1 -1
- package/collections/log-method-latency.collection.d.ts +2 -2
- package/collections/log-method-latency.collection.js +23 -11
- package/collections/log-method-latency.collection.js.map +1 -1
- package/collections/log-subscription.collection.d.ts +2 -2
- package/collections/log-subscription.collection.js +23 -11
- package/collections/log-subscription.collection.js.map +1 -1
- package/collections/log.collection.d.ts +2 -2
- package/collections/log.collection.js +23 -11
- package/collections/log.collection.js.map +1 -1
- package/collections/logged-in-users.collection.d.ts +2 -2
- package/collections/logged-in-users.collection.js +24 -12
- package/collections/logged-in-users.collection.js.map +1 -1
- package/collections/method-call.collection.d.ts +1 -1
- package/collections/method-call.collection.js +13 -2
- package/collections/method-call.collection.js.map +1 -1
- package/collections/method-response.collection.d.ts +1 -1
- package/collections/method-response.collection.js +13 -2
- package/collections/method-response.collection.js.map +1 -1
- package/collections/monitor-cpu.collection.d.ts +2 -2
- package/collections/monitor-cpu.collection.js +24 -12
- package/collections/monitor-cpu.collection.js.map +1 -1
- package/collections/monitor-https-inbound.collection.d.ts +2 -2
- package/collections/monitor-https-inbound.collection.js +24 -12
- package/collections/monitor-https-inbound.collection.js.map +1 -1
- package/collections/monitor-https-outbound.collection.d.ts +2 -2
- package/collections/monitor-https-outbound.collection.js +24 -12
- package/collections/monitor-https-outbound.collection.js.map +1 -1
- package/collections/monitor-memory.collection.d.ts +2 -2
- package/collections/monitor-memory.collection.js +24 -12
- package/collections/monitor-memory.collection.js.map +1 -1
- package/collections/monitor-mongo.collection.d.ts +2 -2
- package/collections/monitor-mongo.collection.js +24 -12
- package/collections/monitor-mongo.collection.js.map +1 -1
- package/collections/notification.collection.d.ts +2 -2
- package/collections/notification.collection.js +24 -12
- package/collections/notification.collection.js.map +1 -1
- package/collections/queue-flag.collection.d.ts +2 -2
- package/collections/queue-flag.collection.js +24 -12
- package/collections/queue-flag.collection.js.map +1 -1
- package/collections/queue-method.collection.d.ts +2 -2
- package/collections/queue-method.collection.js +65 -53
- package/collections/queue-method.collection.js.map +1 -1
- package/collections/queue-response.collection.d.ts +2 -2
- package/collections/queue-response.collection.js +25 -13
- package/collections/queue-response.collection.js.map +1 -1
- package/collections/report-builder-library.collection.d.ts +2 -2
- package/collections/report-builder-library.collection.js +25 -13
- package/collections/report-builder-library.collection.js.map +1 -1
- package/collections/report-builder-report.collection.d.ts +2 -2
- package/collections/report-builder-report.collection.js +25 -13
- package/collections/report-builder-report.collection.js.map +1 -1
- package/collections/user-group.collection.d.ts +2 -2
- package/collections/user-group.collection.js +30 -18
- package/collections/user-group.collection.js.map +1 -1
- package/collections/user-guide.collection.d.ts +2 -2
- package/collections/user-guide.collection.js +28 -16
- package/collections/user-guide.collection.js.map +1 -1
- package/collections/user.collection.d.ts +3 -3
- package/collections/user.collection.js +29 -17
- package/collections/user.collection.js.map +1 -1
- package/http/auth.js.map +1 -1
- package/package.json +1 -1
- package/server-app.js.map +1 -1
|
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
|
|
|
2
2
|
import { FlagModel } from '../models/flag.model';
|
|
3
3
|
interface ResolveIOModel extends FlagModel, Document {
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
5
|
+
export declare let Flags: Model<ResolveIOModel>;
|
|
6
|
+
export declare let FlagVersions: Model<ResolveIOModel>;
|
|
7
7
|
export {};
|
|
@@ -33,17 +33,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
33
33
|
versionKey: false,
|
|
34
34
|
timestamps: true
|
|
35
35
|
});
|
|
36
|
-
exports.Flags =
|
|
37
|
-
exports.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
exports.Flags = null;
|
|
37
|
+
exports.FlagVersions = null;
|
|
38
|
+
initializeCollection();
|
|
39
|
+
function initializeCollection() {
|
|
40
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
41
|
+
exports.Flags = index_1.ResolveIOServer.getMainDB().model('flags', DefaultSchema);
|
|
42
|
+
exports.Flags['simplschema'] = new simpl_schema_1.default(schema);
|
|
43
|
+
schema._id = {
|
|
44
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
45
|
+
};
|
|
46
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
47
|
+
skipVersioning: true,
|
|
48
|
+
versionKey: false,
|
|
49
|
+
timestamps: true
|
|
50
|
+
});
|
|
51
|
+
exports.Flags['versionCollection'] = 'flags.versions';
|
|
52
|
+
exports.FlagVersions = index_1.ResolveIOServer.getMainDB().model(exports.Flags['versionCollection'], VersionSchema);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
setTimeout(function () {
|
|
56
|
+
initializeCollection();
|
|
57
|
+
}, 0);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
48
60
|
|
|
49
61
|
//# sourceMappingURL=flag.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/flag.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,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,OAAO;QACb,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;
|
|
1
|
+
{"version":3,"sources":["../../src/collections/flag.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,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,OAAO;QACb,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;AAIQ,QAAA,KAAK,GAA0B,IAAI,CAAC;AACpC,QAAA,YAAY,GAA0B,IAAI,CAAC;AAEtD,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,aAAK,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAElE,aAAK,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;QAEhD,MAAM,CAAC,GAAG,GAAG;YACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;YACtC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,aAAK,CAAC,mBAAmB,CAAC,GAAG,gBAAgB,CAAC;QAE9C,oBAAY,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,aAAK,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC5F;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"flag.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\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\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends FlagModel, Document {}\n\nexport let Flags: Model<ResolveIOModel> = null;\nexport let FlagVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tFlags = ResolveIOServer.getMainDB().model('flags', DefaultSchema);\n\n\t\tFlags['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tFlags['versionCollection'] = 'flags.versions';\n\n\t\tFlagVersions = ResolveIOServer.getMainDB().model(Flags['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
|
|
|
2
2
|
import { LogMethodLatencyModel } from '../models/log-method-latency.model';
|
|
3
3
|
interface ResolveIOModel extends LogMethodLatencyModel, Document {
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
5
|
+
export declare let LogMethodLatencies: Model<ResolveIOModel>;
|
|
6
|
+
export declare let LogMethodLatencyVersions: Model<ResolveIOModel>;
|
|
7
7
|
export {};
|
|
@@ -41,16 +41,28 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
41
41
|
DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
42
42
|
DefaultSchema.index({ latency_ms: 1 });
|
|
43
43
|
DefaultSchema.index({ method: 1 });
|
|
44
|
-
exports.LogMethodLatencies =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
exports.LogMethodLatencies = null;
|
|
45
|
+
exports.LogMethodLatencyVersions = null;
|
|
46
|
+
initializeCollection();
|
|
47
|
+
function initializeCollection() {
|
|
48
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
49
|
+
exports.LogMethodLatencies = index_1.ResolveIOServer.getMainDB().model('log-method-latencies', DefaultSchema);
|
|
50
|
+
schema._id = {
|
|
51
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
52
|
+
};
|
|
53
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
54
|
+
skipVersioning: true,
|
|
55
|
+
versionKey: false,
|
|
56
|
+
timestamps: true
|
|
57
|
+
});
|
|
58
|
+
exports.LogMethodLatencies['versionCollection'] = 'log-method-latencies.versions';
|
|
59
|
+
exports.LogMethodLatencyVersions = index_1.ResolveIOServer.getMainDB().model(exports.LogMethodLatencies['versionCollection'], VersionSchema);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
setTimeout(function () {
|
|
63
|
+
initializeCollection();
|
|
64
|
+
}, 0);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
55
67
|
|
|
56
68
|
//# sourceMappingURL=log-method-latency.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/log-method-latency.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,kCAA2C;AAG3C,IAAI,MA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K;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,0BAAkB,CAAC,mBAAmB,CAAC,GAAG,+BAA+B,CAAC;QAE1E,gCAAwB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,0BAAkB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KACrH;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 { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\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\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({latency_ms: 1});\nDefaultSchema.index({method: 1});\n\ninterface ResolveIOModel extends LogMethodLatencyModel, Document {}\n\nexport let LogMethodLatencies: Model<ResolveIOModel> = null;\nexport let LogMethodLatencyVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tLogMethodLatencies = ResolveIOServer.getMainDB().model('log-method-latencies', DefaultSchema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tLogMethodLatencies['versionCollection'] = 'log-method-latencies.versions';\n\n\t\tLogMethodLatencyVersions = ResolveIOServer.getMainDB().model(LogMethodLatencies['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
|
|
|
2
2
|
import { LogSubscriptionModel } from '../models/log-subscription.model';
|
|
3
3
|
interface ResolveIOModel extends LogSubscriptionModel, Document {
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
5
|
+
export declare let LogSubscriptions: Model<ResolveIOModel>;
|
|
6
|
+
export declare let LogSubscriptionVersions: Model<ResolveIOModel>;
|
|
7
7
|
export {};
|
|
@@ -49,16 +49,28 @@ DefaultSchema.index({ type: 1 });
|
|
|
49
49
|
DefaultSchema.index({ collection_name: 1 });
|
|
50
50
|
DefaultSchema.index({ date: 1, type: 1 });
|
|
51
51
|
DefaultSchema.index({ createdAt: 1 });
|
|
52
|
-
exports.LogSubscriptions =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
exports.LogSubscriptions = null;
|
|
53
|
+
exports.LogSubscriptionVersions = null;
|
|
54
|
+
initializeCollection();
|
|
55
|
+
function initializeCollection() {
|
|
56
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
57
|
+
exports.LogSubscriptions = index_1.ResolveIOServer.getMainDB().model('log-subscriptions', DefaultSchema);
|
|
58
|
+
schema._id = {
|
|
59
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
60
|
+
};
|
|
61
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
62
|
+
skipVersioning: true,
|
|
63
|
+
versionKey: false,
|
|
64
|
+
timestamps: true
|
|
65
|
+
});
|
|
66
|
+
exports.LogSubscriptions['versionCollection'] = 'log-subscriptions.versions';
|
|
67
|
+
exports.LogSubscriptionVersions = index_1.ResolveIOServer.getMainDB().model(exports.LogSubscriptions['versionCollection'], VersionSchema);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
setTimeout(function () {
|
|
71
|
+
initializeCollection();
|
|
72
|
+
}, 0);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
63
75
|
|
|
64
76
|
//# sourceMappingURL=log-subscription.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/log-subscription.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,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,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;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,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BAAgB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAClH;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log-subscription.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\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\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({type: 1});\nDefaultSchema.index({collection_name: 1});\nDefaultSchema.index({date: 1, type: 1});\nDefaultSchema.index({createdAt: 1});\n\ninterface ResolveIOModel extends LogSubscriptionModel, Document {}\n\nexport let LogSubscriptions: Model<ResolveIOModel> = null;\nexport let LogSubscriptionVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tLogSubscriptions = ResolveIOServer.getMainDB().model('log-subscriptions', DefaultSchema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tLogSubscriptions['versionCollection'] = 'log-subscriptions.versions';\n\n\t\tLogSubscriptionVersions = ResolveIOServer.getMainDB().model(LogSubscriptions['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
|
|
|
2
2
|
import { LogModel } from '../models/log.model';
|
|
3
3
|
interface ResolveIOModel extends LogModel, Document {
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
5
|
+
export declare let Logs: Model<ResolveIOModel>;
|
|
6
|
+
export declare let LogVersions: Model<ResolveIOModel>;
|
|
7
7
|
export {};
|
|
@@ -65,16 +65,28 @@ DefaultSchema.index({ type: 1 });
|
|
|
65
65
|
DefaultSchema.index({ type: 1, date: 1 });
|
|
66
66
|
DefaultSchema.index({ user: 1, date: 1 });
|
|
67
67
|
DefaultSchema.index({ user: 1, type: 1, date: 1 });
|
|
68
|
-
exports.Logs =
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
exports.Logs = null;
|
|
69
|
+
exports.LogVersions = null;
|
|
70
|
+
initializeCollection();
|
|
71
|
+
function initializeCollection() {
|
|
72
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
73
|
+
exports.Logs = index_1.ResolveIOServer.getMainDB().model('logs', DefaultSchema);
|
|
74
|
+
schema._id = {
|
|
75
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
76
|
+
};
|
|
77
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
78
|
+
skipVersioning: true,
|
|
79
|
+
versionKey: false,
|
|
80
|
+
timestamps: true
|
|
81
|
+
});
|
|
82
|
+
exports.Logs['versionCollection'] = 'logs.versions';
|
|
83
|
+
exports.LogVersions = index_1.ResolveIOServer.getMainDB().model(exports.Logs['versionCollection'], VersionSchema);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
setTimeout(function () {
|
|
87
|
+
initializeCollection();
|
|
88
|
+
}, 0);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
79
91
|
|
|
80
92
|
//# sourceMappingURL=log.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/log.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,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,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;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AAS,EAAE,EAAE;QAChC,YAAI,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAEhE,MAAM,CAAC,GAAG,GAAG;YACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;YACtC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,YAAI,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC;QAE5C,mBAAW,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,YAAI,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC1F;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\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\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({type: 1});\nDefaultSchema.index({type: 1, date: 1});\nDefaultSchema.index({user: 1, date: 1});\nDefaultSchema.index({user: 1, type: 1, date: 1});\n\ninterface ResolveIOModel extends LogModel, Document {}\n\nexport let Logs: Model<ResolveIOModel> = null;\nexport let LogVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tLogs = ResolveIOServer.getMainDB().model('logs', DefaultSchema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tLogs['versionCollection'] = 'logs.versions';\n\n\t\tLogVersions = ResolveIOServer.getMainDB().model(Logs['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
|
|
|
2
2
|
import { LoggedInUserModel } from '../models/logged-in-users.model';
|
|
3
3
|
interface ResolveIOModel extends LoggedInUserModel, Document {
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
5
|
+
export declare let LoggedInUsers: Model<ResolveIOModel>;
|
|
6
|
+
export declare let LoggedInUserVersions: Model<ResolveIOModel>;
|
|
7
7
|
export {};
|
|
@@ -57,17 +57,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
57
57
|
timestamps: true
|
|
58
58
|
});
|
|
59
59
|
DefaultSchema.index({ id_ws: 1 });
|
|
60
|
-
exports.LoggedInUsers =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
exports.LoggedInUsers = null;
|
|
61
|
+
exports.LoggedInUserVersions = null;
|
|
62
|
+
initializeCollection();
|
|
63
|
+
function initializeCollection() {
|
|
64
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
65
|
+
exports.LoggedInUsers = index_1.ResolveIOServer.getMainDB().model('logged-in-users', DefaultSchema);
|
|
66
|
+
var vSchema = __assign({}, schema);
|
|
67
|
+
vSchema._id = {
|
|
68
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
69
|
+
};
|
|
70
|
+
var VersionSchema = new mongoose_1.Schema(vSchema, {
|
|
71
|
+
skipVersioning: true,
|
|
72
|
+
versionKey: false,
|
|
73
|
+
timestamps: true
|
|
74
|
+
});
|
|
75
|
+
exports.LoggedInUsers['versionCollection'] = 'logged-in-users.versions';
|
|
76
|
+
exports.LoggedInUserVersions = index_1.ResolveIOServer.getMainDB().model(exports.LoggedInUsers['versionCollection'], VersionSchema);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
setTimeout(function () {
|
|
80
|
+
initializeCollection();
|
|
81
|
+
}, 0);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
72
84
|
|
|
73
85
|
//# sourceMappingURL=logged-in-users.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/logged-in-users.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,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,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":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\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\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({id_ws: 1});\n\ninterface ResolveIOModel extends LoggedInUserModel, Document {}\n\nexport let LoggedInUsers: Model<ResolveIOModel> = null;\nexport let LoggedInUserVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tLoggedInUsers = ResolveIOServer.getMainDB().model('logged-in-users', DefaultSchema);\n\n\t\tlet vSchema = { ...schema };\n\t\tvSchema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(vSchema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tLoggedInUsers['versionCollection'] = 'logged-in-users.versions';\n\n\t\tLoggedInUserVersions = ResolveIOServer.getMainDB().model(LoggedInUsers['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -2,5 +2,5 @@ import { Model, Document } from 'mongoose';
|
|
|
2
2
|
import { MethodCallModel } from '../models/method-call.model';
|
|
3
3
|
interface ResolveIOModel extends MethodCallModel, Document {
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
5
|
+
export declare let MethodCalls: Model<ResolveIOModel>;
|
|
6
6
|
export {};
|
|
@@ -40,7 +40,18 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
40
40
|
});
|
|
41
41
|
DefaultSchema.index({ id_user: 1, message_id: 1 });
|
|
42
42
|
DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 86400 });
|
|
43
|
-
exports.MethodCalls =
|
|
44
|
-
|
|
43
|
+
exports.MethodCalls = null;
|
|
44
|
+
initializeCollection();
|
|
45
|
+
function initializeCollection() {
|
|
46
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
47
|
+
exports.MethodCalls = index_1.ResolveIOServer.getMainDB().model('method-calls', DefaultSchema);
|
|
48
|
+
exports.MethodCalls['simplschema'] = new simpl_schema_1.default(schema);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
setTimeout(function () {
|
|
52
|
+
initializeCollection();
|
|
53
|
+
}, 0);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
45
56
|
|
|
46
57
|
//# sourceMappingURL=method-call.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/method-call.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,OAAO,EAA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,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;AACjD,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;AAItD,QAAA,WAAW,GAA0B,IAAI,CAAC;AAErD,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,mBAAW,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;QAE/E,mBAAW,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;KACtD;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"method-call.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\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\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({id_user: 1, message_id: 1});\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 86400});\n\ninterface ResolveIOModel extends MethodCallModel, Document {}\n\nexport let MethodCalls: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMethodCalls = ResolveIOServer.getMainDB().model('method-calls', DefaultSchema);\n\n\t\tMethodCalls['simplschema'] = new SimpleSchema(schema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -2,5 +2,5 @@ import { Model, Document } from 'mongoose';
|
|
|
2
2
|
import { MethodResponseModel } from '../models/method-response.model';
|
|
3
3
|
interface ResolveIOModel extends MethodResponseModel, Document {
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
5
|
+
export declare let MethodResponses: Model<ResolveIOModel>;
|
|
6
6
|
export {};
|
|
@@ -44,7 +44,18 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
44
44
|
});
|
|
45
45
|
DefaultSchema.index({ id_user: 1, message_id: 1 });
|
|
46
46
|
DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 86400 });
|
|
47
|
-
exports.MethodResponses =
|
|
48
|
-
|
|
47
|
+
exports.MethodResponses = null;
|
|
48
|
+
initializeCollection();
|
|
49
|
+
function initializeCollection() {
|
|
50
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
51
|
+
exports.MethodResponses = index_1.ResolveIOServer.getMainDB().model('method-responses', DefaultSchema);
|
|
52
|
+
exports.MethodResponses['simplschema'] = new simpl_schema_1.default(schema);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
setTimeout(function () {
|
|
56
|
+
initializeCollection();
|
|
57
|
+
}, 0);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
49
60
|
|
|
50
61
|
//# sourceMappingURL=method-response.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/method-response.collection.ts"],"names":[],"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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;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,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;AACjD,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;AAItD,QAAA,eAAe,GAA0B,IAAI,CAAC;AAEzD,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,uBAAe,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;QAEvF,uBAAe,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;KAC1D;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"method-response.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\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\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({id_user: 1, message_id: 1});\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 86400});\n\ninterface ResolveIOModel extends MethodResponseModel, Document {}\n\nexport let MethodResponses: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMethodResponses = ResolveIOServer.getMainDB().model('method-responses', DefaultSchema);\n\n\t\tMethodResponses['simplschema'] = new SimpleSchema(schema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
|
|
|
2
2
|
import { MonitorCPUModel } from '../models/monitor-cpu.model';
|
|
3
3
|
interface ResolveIOModel extends MonitorCPUModel, Document {
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
5
|
+
export declare let MonitorCPUs: Model<ResolveIOModel>;
|
|
6
|
+
export declare let MonitorCPUVersions: Model<ResolveIOModel>;
|
|
7
7
|
export {};
|
|
@@ -44,17 +44,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
44
44
|
DefaultSchema.index({ client: 1, instance: 1, date: 1 });
|
|
45
45
|
DefaultSchema.index({ client: 1, date: 1 });
|
|
46
46
|
DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
47
|
-
exports.MonitorCPUs =
|
|
48
|
-
exports.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
exports.MonitorCPUs = null;
|
|
48
|
+
exports.MonitorCPUVersions = null;
|
|
49
|
+
initializeCollection();
|
|
50
|
+
function initializeCollection() {
|
|
51
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
52
|
+
exports.MonitorCPUs = index_1.ResolveIOServer.getMainDB().model('monitor-cpus', DefaultSchema);
|
|
53
|
+
exports.MonitorCPUs['simplschema'] = new simpl_schema_1.default(schema);
|
|
54
|
+
schema._id = {
|
|
55
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
56
|
+
};
|
|
57
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
58
|
+
skipVersioning: true,
|
|
59
|
+
versionKey: false,
|
|
60
|
+
timestamps: true
|
|
61
|
+
});
|
|
62
|
+
exports.MonitorCPUs['versionCollection'] = 'monitor-cpus.versions';
|
|
63
|
+
exports.MonitorCPUVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorCPUs['versionCollection'], VersionSchema);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
setTimeout(function () {
|
|
67
|
+
initializeCollection();
|
|
68
|
+
}, 0);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
59
71
|
|
|
60
72
|
//# sourceMappingURL=monitor-cpu.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/monitor-cpu.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;A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,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;QAE/E,mBAAW,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;QAEtD,MAAM,CAAC,GAAG,GAAG;YACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;YACtC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,mBAAW,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,CAAC;QAE3D,0BAAkB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,mBAAW,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KACxG;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,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\tinstance: {\n\t\ttype: String\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, instance: 1, date: 1});\nDefaultSchema.index({client: 1, date: 1});\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\ninterface ResolveIOModel extends MonitorCPUModel, Document {}\n\nexport let MonitorCPUs: Model<ResolveIOModel> = null;\nexport let MonitorCPUVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMonitorCPUs = ResolveIOServer.getMainDB().model('monitor-cpus', DefaultSchema);\n\n\t\tMonitorCPUs['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tMonitorCPUs['versionCollection'] = 'monitor-cpus.versions';\n\n\t\tMonitorCPUVersions = ResolveIOServer.getMainDB().model(MonitorCPUs['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
|
|
|
2
2
|
import { MonitorHTTPSInboundModel } from '../models/monitor-https-inbound.model';
|
|
3
3
|
interface ResolveIOModel extends MonitorHTTPSInboundModel, Document {
|
|
4
4
|
}
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
5
|
+
export declare let MonitorHTTPSInbounds: Model<ResolveIOModel>;
|
|
6
|
+
export declare let MonitorHTTPInboundVersions: Model<ResolveIOModel>;
|
|
7
7
|
export {};
|
|
@@ -54,17 +54,29 @@ DefaultSchema.index({ client: 1, instance: 1, date: 1, method: 1, url: 1 });
|
|
|
54
54
|
DefaultSchema.index({ client: 1, date: 1, duration: 1 });
|
|
55
55
|
DefaultSchema.index({ client: 1, date: 1, method: 1, url: 1 });
|
|
56
56
|
DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
57
|
-
exports.MonitorHTTPSInbounds =
|
|
58
|
-
exports.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
exports.MonitorHTTPSInbounds = null;
|
|
58
|
+
exports.MonitorHTTPInboundVersions = null;
|
|
59
|
+
initializeCollection();
|
|
60
|
+
function initializeCollection() {
|
|
61
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
62
|
+
exports.MonitorHTTPSInbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-inbounds', DefaultSchema);
|
|
63
|
+
exports.MonitorHTTPSInbounds['simplschema'] = new simpl_schema_1.default(schema);
|
|
64
|
+
schema._id = {
|
|
65
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
66
|
+
};
|
|
67
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
68
|
+
skipVersioning: true,
|
|
69
|
+
versionKey: false,
|
|
70
|
+
timestamps: true
|
|
71
|
+
});
|
|
72
|
+
exports.MonitorHTTPSInbounds['versionCollection'] = 'monitor-https-inbounds.versions';
|
|
73
|
+
exports.MonitorHTTPInboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSInbounds['versionCollection'], VersionSchema);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
setTimeout(function () {
|
|
77
|
+
initializeCollection();
|
|
78
|
+
}, 0);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
69
81
|
|
|
70
82
|
//# sourceMappingURL=monitor-https-inbound.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/monitor-https-inbound.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QA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AAE,CAAC,CAAC,CAAC;KACN;AACF,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\tinstance: {\n\t\ttype: String\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, instance: 1, date: 1, method: 1, url: 1});\nDefaultSchema.index({client: 1, date: 1, duration: 1});\nDefaultSchema.index({client: 1, date: 1, method: 1, url: 1});\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\ninterface ResolveIOModel extends MonitorHTTPSInboundModel, Document {}\n\nexport let MonitorHTTPSInbounds: Model<ResolveIOModel> = null;\nexport let MonitorHTTPInboundVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMonitorHTTPSInbounds = ResolveIOServer.getMainDB().model('monitor-https-inbounds', DefaultSchema);\n\n\t\tMonitorHTTPSInbounds['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tMonitorHTTPSInbounds['versionCollection'] = 'monitor-https-inbounds.versions';\n\n\t\tMonitorHTTPInboundVersions = ResolveIOServer.getMainDB().model(MonitorHTTPSInbounds['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|