@resolveio/server-lib 8.0.17 → 8.0.19
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.js +22 -13
- package/collections/app-status.collection.js.map +1 -1
- package/collections/app-version.collection.js +24 -15
- package/collections/app-version.collection.js.map +1 -1
- package/collections/counter.collection.js +24 -15
- package/collections/counter.collection.js.map +1 -1
- package/collections/cron-job-history.collection.js +23 -14
- package/collections/cron-job-history.collection.js.map +1 -1
- package/collections/cron-job.collection.js +23 -14
- package/collections/cron-job.collection.js.map +1 -1
- package/collections/email-history.collection.js +22 -13
- package/collections/email-history.collection.js.map +1 -1
- package/collections/email-verified.collection.js +22 -13
- package/collections/email-verified.collection.js.map +1 -1
- package/collections/file.collection.js +26 -17
- package/collections/file.collection.js.map +1 -1
- package/collections/flag.collection.js +22 -13
- package/collections/flag.collection.js.map +1 -1
- package/collections/log-method-latency.collection.js +21 -12
- package/collections/log-method-latency.collection.js.map +1 -1
- package/collections/log-subscription.collection.js +21 -12
- package/collections/log-subscription.collection.js.map +1 -1
- package/collections/log.collection.js +21 -12
- package/collections/log.collection.js.map +1 -1
- package/collections/logged-in-users.collection.js +22 -13
- package/collections/logged-in-users.collection.js.map +1 -1
- package/collections/method-call.collection.js +12 -3
- package/collections/method-call.collection.js.map +1 -1
- package/collections/method-response.collection.js +12 -3
- package/collections/method-response.collection.js.map +1 -1
- package/collections/monitor-cpu.collection.js +22 -13
- package/collections/monitor-cpu.collection.js.map +1 -1
- package/collections/monitor-https-inbound.collection.js +22 -13
- package/collections/monitor-https-inbound.collection.js.map +1 -1
- package/collections/monitor-https-outbound.collection.js +22 -13
- package/collections/monitor-https-outbound.collection.js.map +1 -1
- package/collections/monitor-memory.collection.js +22 -13
- package/collections/monitor-memory.collection.js.map +1 -1
- package/collections/monitor-mongo.collection.js +22 -13
- package/collections/monitor-mongo.collection.js.map +1 -1
- package/collections/notification.collection.js +22 -13
- package/collections/notification.collection.js.map +1 -1
- package/collections/queue-flag.collection.js +22 -13
- package/collections/queue-flag.collection.js.map +1 -1
- package/collections/queue-method.collection.js +64 -55
- package/collections/queue-method.collection.js.map +1 -1
- package/collections/queue-response.collection.js +23 -14
- package/collections/queue-response.collection.js.map +1 -1
- package/collections/report-builder-library.collection.js +23 -14
- package/collections/report-builder-library.collection.js.map +1 -1
- package/collections/report-builder-report.collection.js +23 -14
- package/collections/report-builder-report.collection.js.map +1 -1
- package/collections/user-group.collection.js +28 -19
- package/collections/user-group.collection.js.map +1 -1
- package/collections/user-guide.collection.js +26 -17
- package/collections/user-guide.collection.js.map +1 -1
- package/collections/user.collection.d.ts +0 -1
- package/collections/user.collection.js +27 -18
- package/collections/user.collection.js.map +1 -1
- package/cron/cron.d.ts +1 -1
- package/cron/cron.js +4 -4
- package/cron/cron.js.map +1 -1
- package/fixtures/cron-jobs.js +1 -0
- package/fixtures/cron-jobs.js.map +1 -1
- package/fixtures/init.js +1 -0
- package/fixtures/init.js.map +1 -1
- package/http/auth.js +1 -0
- package/http/auth.js.map +1 -1
- package/http/health.js +1 -0
- package/http/health.js.map +1 -1
- package/http/home.js +1 -0
- package/http/home.js.map +1 -1
- package/index.d.ts +1 -2
- package/index.js +12 -4
- package/index.js.map +1 -1
- package/managers/cron.manager.js +1 -0
- package/managers/cron.manager.js.map +1 -1
- package/managers/database.manager.js +1 -0
- package/managers/database.manager.js.map +1 -1
- package/managers/method.manager.js +1 -0
- package/managers/method.manager.js.map +1 -1
- package/managers/monitor.manager.js +1 -0
- package/managers/monitor.manager.js.map +1 -1
- package/managers/queue-method.manager.js +1 -0
- package/managers/queue-method.manager.js.map +1 -1
- package/managers/subscription.manager.js +1 -0
- package/managers/subscription.manager.js.map +1 -1
- package/methods/accounts.js +1 -0
- package/methods/accounts.js.map +1 -1
- package/methods/aws.js +1 -0
- package/methods/aws.js.map +1 -1
- package/methods/cloudconvert.js +1 -0
- package/methods/cloudconvert.js.map +1 -1
- package/methods/collections.js +1 -0
- package/methods/collections.js.map +1 -1
- package/methods/counters.js +1 -0
- package/methods/counters.js.map +1 -1
- package/methods/cron-jobs.js +1 -0
- package/methods/cron-jobs.js.map +1 -1
- package/methods/flags.js +1 -0
- package/methods/flags.js.map +1 -1
- package/methods/logs.js +1 -0
- package/methods/logs.js.map +1 -1
- package/methods/monitor.js +1 -0
- package/methods/monitor.js.map +1 -1
- package/methods/pdf.js +1 -0
- package/methods/pdf.js.map +1 -1
- package/methods/report-builder.js +1 -0
- package/methods/report-builder.js.map +1 -1
- package/methods/support.js +1 -0
- package/methods/support.js.map +1 -1
- package/models/pagination.model.js +1 -0
- package/models/pagination.model.js.map +1 -1
- package/package.json +14 -18
- package/public_api.js +80 -35
- package/public_api.js.map +1 -1
- package/publications/app-status.js +1 -0
- package/publications/app-status.js.map +1 -1
- package/publications/app-version.js +1 -0
- package/publications/app-version.js.map +1 -1
- package/publications/cron-jobs.js +1 -0
- package/publications/cron-jobs.js.map +1 -1
- package/publications/files.js +1 -0
- package/publications/files.js.map +1 -1
- package/publications/flags.js +1 -0
- package/publications/flags.js.map +1 -1
- package/publications/logs.js +1 -0
- package/publications/logs.js.map +1 -1
- package/publications/method-calls.js +1 -0
- package/publications/method-calls.js.map +1 -1
- package/publications/method-responses.js +1 -0
- package/publications/method-responses.js.map +1 -1
- package/publications/notifications.js +1 -0
- package/publications/notifications.js.map +1 -1
- package/publications/report-builder-libraries.js +1 -0
- package/publications/report-builder-libraries.js.map +1 -1
- package/publications/report-builder-reports.js +1 -0
- package/publications/report-builder-reports.js.map +1 -1
- package/publications/super-admin.js +1 -0
- package/publications/super-admin.js.map +1 -1
- package/publications/user-groups.js +1 -0
- package/publications/user-groups.js.map +1 -1
- package/publications/user-guides.js +1 -0
- package/publications/user-guides.js.map +1 -1
- package/server-app.js +30 -21
- package/server-app.js.map +1 -1
- package/util/common.js +1 -0
- package/util/common.js.map +1 -1
- package/util/schema-report-builder.js +1 -0
- package/util/schema-report-builder.js.map +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MonitorHTTPSOutboundVersions = exports.MonitorHTTPSOutbounds = void 0;
|
|
3
4
|
var mongoose_1 = require("mongoose");
|
|
4
5
|
var simpl_schema_1 = require("simpl-schema");
|
|
5
6
|
var index_1 = require("../index");
|
|
@@ -62,19 +63,27 @@ DefaultSchema.index({ client: 1, status: 1 });
|
|
|
62
63
|
DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
63
64
|
exports.MonitorHTTPSOutbounds = null;
|
|
64
65
|
exports.MonitorHTTPSOutboundVersions = null;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
initializeCollection();
|
|
67
|
+
function initializeCollection() {
|
|
68
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
69
|
+
exports.MonitorHTTPSOutbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-outbounds', DefaultSchema);
|
|
70
|
+
exports.MonitorHTTPSOutbounds['simplschema'] = new simpl_schema_1.default(schema);
|
|
71
|
+
schema._id = {
|
|
72
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
73
|
+
};
|
|
74
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
75
|
+
skipVersioning: true,
|
|
76
|
+
versionKey: false,
|
|
77
|
+
timestamps: true
|
|
78
|
+
});
|
|
79
|
+
exports.MonitorHTTPSOutbounds['versionCollection'] = 'monitor-https-outbounds.versions';
|
|
80
|
+
exports.MonitorHTTPSOutboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSOutbounds['versionCollection'], VersionSchema);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
setTimeout(function () {
|
|
84
|
+
initializeCollection();
|
|
85
|
+
}, 0);
|
|
86
|
+
}
|
|
78
87
|
}
|
|
79
88
|
|
|
80
89
|
//# sourceMappingURL=monitor-https-outbound.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/monitor-https-outbound.collection.ts"],"names":[],"mappings":"
|
|
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,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;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,C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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,6BAAqB,CAAC,mBAAmB,CAAC,GAAG,kCAAkC,CAAC;QAEhF,oCAA4B,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,6BAAqB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC5H;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,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\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\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, instance: 1, date: 1, method: 1, url: 1, status: 1});\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}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\ninterface ResolveIOModel extends MonitorHTTPSOutboundModel, Document {}\n\nexport let MonitorHTTPSOutbounds: Model<ResolveIOModel> = null;\nexport let MonitorHTTPSOutboundVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMonitorHTTPSOutbounds = ResolveIOServer.getMainDB().model('monitor-https-outbounds', DefaultSchema);\n\n\t\tMonitorHTTPSOutbounds['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\tMonitorHTTPSOutbounds['versionCollection'] = 'monitor-https-outbounds.versions';\n\n\t\tMonitorHTTPSOutboundVersions = ResolveIOServer.getMainDB().model(MonitorHTTPSOutbounds['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MonitorMemoryVersions = exports.MonitorMemorys = void 0;
|
|
3
4
|
var mongoose_1 = require("mongoose");
|
|
4
5
|
var simpl_schema_1 = require("simpl-schema");
|
|
5
6
|
var index_1 = require("../index");
|
|
@@ -58,19 +59,27 @@ DefaultSchema.index({ client: 1, date: 1 });
|
|
|
58
59
|
DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
|
|
59
60
|
exports.MonitorMemorys = null;
|
|
60
61
|
exports.MonitorMemoryVersions = null;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
initializeCollection();
|
|
63
|
+
function initializeCollection() {
|
|
64
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
65
|
+
exports.MonitorMemorys = index_1.ResolveIOServer.getMainDB().model('monitor-memorys', DefaultSchema);
|
|
66
|
+
exports.MonitorMemorys['simplschema'] = new simpl_schema_1.default(schema);
|
|
67
|
+
schema._id = {
|
|
68
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
69
|
+
};
|
|
70
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
71
|
+
skipVersioning: true,
|
|
72
|
+
versionKey: false,
|
|
73
|
+
timestamps: true
|
|
74
|
+
});
|
|
75
|
+
exports.MonitorMemorys['versionCollection'] = 'monitor-memorys.versions';
|
|
76
|
+
exports.MonitorMemoryVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMemorys['versionCollection'], VersionSchema);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
setTimeout(function () {
|
|
80
|
+
initializeCollection();
|
|
81
|
+
}, 0);
|
|
82
|
+
}
|
|
74
83
|
}
|
|
75
84
|
|
|
76
85
|
//# sourceMappingURL=monitor-memory.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/monitor-memory.collection.ts"],"names":[],"mappings":"
|
|
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,I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AAE/D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,sBAAc,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QAErF,sBAAc,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;QAEzD,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,sBAAc,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,CAAC;QAEjE,6BAAqB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC9G;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,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\tinstance: {\n\t\ttype: String\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, instance: 1, date: 1});\nDefaultSchema.index({client: 1, date: 1});\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\ninterface ResolveIOModel extends MonitorMemoryModel, Document {}\n\nexport let MonitorMemorys: Model<ResolveIOModel> = null;\nexport let MonitorMemoryVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMonitorMemorys = ResolveIOServer.getMainDB().model('monitor-memorys', DefaultSchema);\n\n\t\tMonitorMemorys['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\tMonitorMemorys['versionCollection'] = 'monitor-memorys.versions';\n\n\t\tMonitorMemoryVersions = ResolveIOServer.getMainDB().model(MonitorMemorys['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MonitorMongoVersions = exports.MonitorMongos = void 0;
|
|
3
4
|
var mongoose_1 = require("mongoose");
|
|
4
5
|
var simpl_schema_1 = require("simpl-schema");
|
|
5
6
|
var index_1 = require("../index");
|
|
@@ -52,19 +53,27 @@ DefaultSchema.index({ client: 1, date: 1, method: 1 });
|
|
|
52
53
|
DefaultSchema.index({ client: 1, instance: 1, date: 1, method: 1 });
|
|
53
54
|
exports.MonitorMongos = null;
|
|
54
55
|
exports.MonitorMongoVersions = null;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
initializeCollection();
|
|
57
|
+
function initializeCollection() {
|
|
58
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
59
|
+
exports.MonitorMongos = index_1.ResolveIOServer.getMainDB().model('monitor-mongos', DefaultSchema);
|
|
60
|
+
exports.MonitorMongos['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.MonitorMongos['versionCollection'] = 'monitor-mongos.versions';
|
|
70
|
+
exports.MonitorMongoVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMongos['versionCollection'], VersionSchema);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
setTimeout(function () {
|
|
74
|
+
initializeCollection();
|
|
75
|
+
}, 0);
|
|
76
|
+
}
|
|
68
77
|
}
|
|
69
78
|
|
|
70
79
|
//# sourceMappingURL=monitor-mongo.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/monitor-mongo.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/monitor-mongo.collection.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,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AAoB,GAA0B,IAAI,CAAC;AAE9D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,qBAAa,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;QAEnF,qBAAa,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;QAExD,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,qBAAa,CAAC,mBAAmB,CAAC,GAAG,yBAAyB,CAAC;QAE/D,4BAAoB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,qBAAa,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC5G;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,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\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\tdoc_collection: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tquery: {\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({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({client: 1, date: 1, method: 1});\nDefaultSchema.index({client: 1, instance: 1, date: 1, method: 1});\n\ninterface ResolveIOModel extends MonitorMongoModel, Document {}\n\nexport let MonitorMongos: Model<ResolveIOModel> = null;\nexport let MonitorMongoVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMonitorMongos = ResolveIOServer.getMainDB().model('monitor-mongos', DefaultSchema);\n\n\t\tMonitorMongos['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\tMonitorMongos['versionCollection'] = 'monitor-mongos.versions';\n\n\t\tMonitorMongoVersions = ResolveIOServer.getMainDB().model(MonitorMongos['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationVersions = exports.Notifications = void 0;
|
|
3
4
|
var mongoose_1 = require("mongoose");
|
|
4
5
|
var simpl_schema_1 = require("simpl-schema");
|
|
5
6
|
var index_1 = require("../index");
|
|
@@ -31,19 +32,27 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
31
32
|
});
|
|
32
33
|
exports.Notifications = null;
|
|
33
34
|
exports.NotificationVersions = null;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
initializeCollection();
|
|
36
|
+
function initializeCollection() {
|
|
37
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
38
|
+
exports.Notifications = index_1.ResolveIOServer.getMainDB().model('notifications', DefaultSchema);
|
|
39
|
+
exports.Notifications['simplschema'] = new simpl_schema_1.default(schema);
|
|
40
|
+
schema._id = {
|
|
41
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
42
|
+
};
|
|
43
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
44
|
+
skipVersioning: true,
|
|
45
|
+
versionKey: false,
|
|
46
|
+
timestamps: true
|
|
47
|
+
});
|
|
48
|
+
exports.Notifications['versionCollection'] = 'notifications.versions';
|
|
49
|
+
exports.NotificationVersions = index_1.ResolveIOServer.getMainDB().model(exports.Notifications['versionCollection'], VersionSchema);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
setTimeout(function () {
|
|
53
|
+
initializeCollection();
|
|
54
|
+
}, 0);
|
|
55
|
+
}
|
|
47
56
|
}
|
|
48
57
|
|
|
49
58
|
//# sourceMappingURL=notification.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/notification.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/notification.collection.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,6CAAwC;AAExC,kCAA2C;AAE3C,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,IAA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Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { NotificationModel } from '../models/notification.model';\nimport { ResolveIOServer } from '../index';\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};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends NotificationModel, Document {}\n\nexport let Notifications: Model<ResolveIOModel> = null;\nexport let NotificationVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tNotifications = ResolveIOServer.getMainDB().model('notifications', DefaultSchema);\n\n\t\tNotifications['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\tNotifications['versionCollection'] = 'notifications.versions';\n\n\t\tNotificationVersions = ResolveIOServer.getMainDB().model(Notifications['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QueueFlagVersions = exports.QueueFlags = void 0;
|
|
3
4
|
var mongoose_1 = require("mongoose");
|
|
4
5
|
var simpl_schema_1 = require("simpl-schema");
|
|
5
6
|
var index_1 = require("../index");
|
|
@@ -29,19 +30,27 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
29
30
|
DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 60 });
|
|
30
31
|
exports.QueueFlags = null;
|
|
31
32
|
exports.QueueFlagVersions = null;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
initializeCollection();
|
|
34
|
+
function initializeCollection() {
|
|
35
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
36
|
+
exports.QueueFlags = index_1.ResolveIOServer.getMainDB().model('queue-flags', DefaultSchema);
|
|
37
|
+
exports.QueueFlags['simplschema'] = new simpl_schema_1.default(schema);
|
|
38
|
+
schema._id = {
|
|
39
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
40
|
+
};
|
|
41
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
42
|
+
skipVersioning: true,
|
|
43
|
+
versionKey: false,
|
|
44
|
+
timestamps: true
|
|
45
|
+
});
|
|
46
|
+
exports.QueueFlags['versionCollection'] = 'queue-flags.versions';
|
|
47
|
+
exports.QueueFlagVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueFlags['versionCollection'], VersionSchema);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
setTimeout(function () {
|
|
51
|
+
initializeCollection();
|
|
52
|
+
}, 0);
|
|
53
|
+
}
|
|
45
54
|
}
|
|
46
55
|
|
|
47
56
|
//# sourceMappingURL=queue-flag.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/queue-flag.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/queue-flag.collection.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;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CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KACtG;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"queue-flag.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { CollectionDocument } from '../models/collection-document.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};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 60});\n\ninterface ResolveIOModel extends CollectionDocument, Document {}\n\nexport let QueueFlags: Model<ResolveIOModel> = null;\nexport let QueueFlagVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tQueueFlags = ResolveIOServer.getMainDB().model('queue-flags', DefaultSchema);\n\n\t\tQueueFlags['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\tQueueFlags['versionCollection'] = 'queue-flags.versions';\n\n\t\tQueueFlagVersions = ResolveIOServer.getMainDB().model(QueueFlags['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.QueueMethodVersions = exports.QueueMethods = void 0;
|
|
14
15
|
var mongoose_1 = require("mongoose");
|
|
15
16
|
var simpl_schema_1 = require("simpl-schema");
|
|
16
17
|
var index_1 = require("../index");
|
|
@@ -69,61 +70,69 @@ var DefaultSchema = new mongoose_1.Schema(mongooseSchema, {
|
|
|
69
70
|
DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 });
|
|
70
71
|
exports.QueueMethods = null;
|
|
71
72
|
exports.QueueMethodVersions = null;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
73
|
+
initializeCollection();
|
|
74
|
+
function initializeCollection() {
|
|
75
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
76
|
+
exports.QueueMethods = index_1.ResolveIOServer.getMainDB().model('queue-methods', DefaultSchema);
|
|
77
|
+
var vSchema = __assign({}, mongooseSchema);
|
|
78
|
+
vSchema._id = {
|
|
79
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
80
|
+
};
|
|
81
|
+
var VersionSchema = new mongoose_1.Schema(vSchema, {
|
|
82
|
+
skipVersioning: true,
|
|
83
|
+
versionKey: false,
|
|
84
|
+
timestamps: true,
|
|
85
|
+
minimize: false
|
|
86
|
+
});
|
|
87
|
+
exports.QueueMethods['versionCollection'] = 'queue-methods.versions';
|
|
88
|
+
exports.QueueMethodVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueMethods['versionCollection'], VersionSchema);
|
|
89
|
+
var simplSchema = {
|
|
90
|
+
_id: {
|
|
91
|
+
type: String,
|
|
92
|
+
optional: true
|
|
93
|
+
},
|
|
94
|
+
__v: {
|
|
95
|
+
type: Number,
|
|
96
|
+
optional: true
|
|
97
|
+
},
|
|
98
|
+
updatedAt: {
|
|
99
|
+
type: Date,
|
|
100
|
+
optional: true
|
|
101
|
+
},
|
|
102
|
+
createdAt: {
|
|
103
|
+
type: Date,
|
|
104
|
+
optional: true
|
|
105
|
+
},
|
|
106
|
+
method: {
|
|
107
|
+
type: String
|
|
108
|
+
},
|
|
109
|
+
method_data: {
|
|
110
|
+
type: Array
|
|
111
|
+
},
|
|
112
|
+
'method_data.$': {
|
|
113
|
+
type: Object,
|
|
114
|
+
blackbox: true
|
|
115
|
+
},
|
|
116
|
+
id_ws: {
|
|
117
|
+
type: String
|
|
118
|
+
},
|
|
119
|
+
messageId: {
|
|
120
|
+
type: Number
|
|
121
|
+
},
|
|
122
|
+
id_user: {
|
|
123
|
+
type: String
|
|
124
|
+
},
|
|
125
|
+
user: {
|
|
126
|
+
type: String
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
exports.QueueMethods['simplschema'] = new simpl_schema_1.default(simplSchema);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
setTimeout(function () {
|
|
133
|
+
initializeCollection();
|
|
134
|
+
}, 0);
|
|
135
|
+
}
|
|
127
136
|
}
|
|
128
137
|
|
|
129
138
|
//# sourceMappingURL=queue-method.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/queue-method.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/queue-method.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,cAAc,GAAQ;IACzB,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,WAAW,EAAE;QACZ,IAAI,EAAE,KAAK;KACX;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,SAAS,EAAE;QACV,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,gBAAgB,EAAE;QACjB,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,cAAc,EAAE;IAChD,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,KAAK;CACf,CAAC,CAAC;AAEH,aAAa,CAAC,KAA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AK;aACX;YACD,eAAe,EAAE;gBAChB,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,IAAI;aACd;YACD,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;YACD,SAAS,EAAE;gBACV,IAAI,EAAE,MAAM;aACZ;YACD,OAAO,EAAE;gBACR,IAAI,EAAE,MAAM;aACZ;YACD,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;aACZ;SACD,CAAC;QAEF,oBAAY,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,WAAW,CAAC,CAAC;KAC5D;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"queue-method.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { QueueMethodModel } from '../models/queue-method.model';\n\nlet mongooseSchema: 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\tmethod: {\n\t\ttype: String\n\t},\n\tmethod_data: {\n\t\ttype: Array\n\t},\n\t'method_data.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tid_methodLatency: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(mongooseSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true,\n\tminimize: false\n});\n\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60});\n\ninterface ResolveIOModel extends QueueMethodModel, Document {}\n\nexport let QueueMethods: Model<ResolveIOModel> = null;\nexport let QueueMethodVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tQueueMethods = ResolveIOServer.getMainDB().model('queue-methods', DefaultSchema); \n\n\t\tlet vSchema = { ...mongooseSchema };\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\tminimize: false\n\t\t});\n\n\t\tQueueMethods['versionCollection'] = 'queue-methods.versions';\n\n\t\tQueueMethodVersions = ResolveIOServer.getMainDB().model(QueueMethods['versionCollection'], VersionSchema);\n\n\t\tlet simplSchema = {\n\t\t\t_id: {\n\t\t\t\ttype: String,\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t__v: {\n\t\t\t\ttype: Number,\n\t\t\t\toptional: true \n\t\t\t},\n\t\t\tupdatedAt: {\n\t\t\t\ttype: Date,\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tcreatedAt: {\n\t\t\t\ttype: Date,\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tmethod: {\n\t\t\t\ttype: String\n\t\t\t},\n\t\t\tmethod_data: {\n\t\t\t\ttype: Array\n\t\t\t},\n\t\t\t'method_data.$': {\n\t\t\t\ttype: Object,\n\t\t\t\tblackbox: true\n\t\t\t},\n\t\t\tid_ws: {\n\t\t\t\ttype: String\n\t\t\t},\n\t\t\tmessageId: {\n\t\t\t\ttype: Number\n\t\t\t},\n\t\t\tid_user: {\n\t\t\t\ttype: String\n\t\t\t},\n\t\t\tuser: {\n\t\t\t\ttype: String\n\t\t\t}\n\t\t};\n\n\t\tQueueMethods['simplschema'] = new SimpleSchema(simplSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.QueueResponseVersions = exports.QueueResponses = void 0;
|
|
14
15
|
var mongoose_1 = require("mongoose");
|
|
15
16
|
var simpl_schema_1 = require("simpl-schema");
|
|
16
17
|
var index_1 = require("../index");
|
|
@@ -62,20 +63,28 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
62
63
|
DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 });
|
|
63
64
|
exports.QueueResponses = null;
|
|
64
65
|
exports.QueueResponseVersions = null;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
initializeCollection();
|
|
67
|
+
function initializeCollection() {
|
|
68
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
69
|
+
exports.QueueResponses = index_1.ResolveIOServer.getMainDB().model('queue-responses', DefaultSchema);
|
|
70
|
+
var vSchema = __assign({}, schema);
|
|
71
|
+
vSchema._id = {
|
|
72
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
73
|
+
};
|
|
74
|
+
var VersionSchema = new mongoose_1.Schema(vSchema, {
|
|
75
|
+
skipVersioning: true,
|
|
76
|
+
versionKey: false,
|
|
77
|
+
timestamps: true
|
|
78
|
+
});
|
|
79
|
+
exports.QueueResponses['versionCollection'] = 'queue-responses.versions';
|
|
80
|
+
exports.QueueResponseVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueResponses['versionCollection'], VersionSchema);
|
|
81
|
+
exports.QueueResponses['simplschema'] = new simpl_schema_1.default(schema);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
setTimeout(function () {
|
|
85
|
+
initializeCollection();
|
|
86
|
+
}, 0);
|
|
87
|
+
}
|
|
79
88
|
}
|
|
80
89
|
|
|
81
90
|
//# sourceMappingURL=queue-response.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/queue-response.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/queue-response.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,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,SAAS,EAAE;QACV,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,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,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,EAAC,CAAC,CAAC;AAI9C,QAAA,cAAc,GAA0B,IAAI,CAAC;AAC7C,QAAA,qBAAqB,GAA0B,IAAI,CAAC;AAE/D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,sBAAc,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QAErF,IAAI,OAAO,gBAAQ,MAAM,CAAE,CAAC;QAC5B,OAAO,CAAC,GAAG,GAAG;YACb,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,OAAO,EAAE;YACvC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,sBAAc,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,CAAC;QAEjE,6BAAqB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;QAE9G,sBAAc,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;KACzD;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"queue-response.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { QueueResponseModel } from '../models/queue-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\tmethod: {\n\t\ttype: String\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\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({date: 1}, {expireAfterSeconds: 60});\n\ninterface ResolveIOModel extends QueueResponseModel, Document {}\n\nexport let QueueResponses: Model<ResolveIOModel> = null;\nexport let QueueResponseVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tQueueResponses = ResolveIOServer.getMainDB().model('queue-responses', 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\tQueueResponses['versionCollection'] = 'queue-responses.versions';\n\n\t\tQueueResponseVersions = ResolveIOServer.getMainDB().model(QueueResponses['versionCollection'], VersionSchema);\n\n\t\tQueueResponses['simplschema'] = new SimpleSchema(schema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|