@resolveio/server-lib 9.0.34 → 9.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client-server-app.js +48 -7
- package/client-server-app.js.map +1 -1
- package/collections/app-status.collection.js +11 -8
- package/collections/app-status.collection.js.map +1 -1
- package/collections/app-version.collection.js +11 -8
- package/collections/app-version.collection.js.map +1 -1
- package/collections/counter.collection.js +11 -8
- package/collections/counter.collection.js.map +1 -1
- package/collections/cron-job-history.collection.js +12 -9
- package/collections/cron-job-history.collection.js.map +1 -1
- package/collections/cron-job.collection.js +11 -8
- package/collections/cron-job.collection.js.map +1 -1
- package/collections/email-history.collection.js +11 -8
- package/collections/email-history.collection.js.map +1 -1
- package/collections/email-verified.collection.js +12 -9
- package/collections/email-verified.collection.js.map +1 -1
- package/collections/file.collection.js +11 -8
- package/collections/file.collection.js.map +1 -1
- package/collections/flag.collection.js +11 -8
- package/collections/flag.collection.js.map +1 -1
- package/collections/log-method-latency.collection.js +14 -11
- package/collections/log-method-latency.collection.js.map +1 -1
- package/collections/log-subscription.collection.js +16 -13
- package/collections/log-subscription.collection.js.map +1 -1
- package/collections/log.collection.js +19 -16
- package/collections/log.collection.js.map +1 -1
- package/collections/logged-in-users.collection.js +12 -9
- package/collections/logged-in-users.collection.js.map +1 -1
- package/collections/method-call.collection.js +13 -10
- package/collections/method-call.collection.js.map +1 -1
- package/collections/method-response.collection.js +13 -10
- package/collections/method-response.collection.js.map +1 -1
- package/collections/monitor-cpu.collection.js +16 -13
- package/collections/monitor-cpu.collection.js.map +1 -1
- package/collections/monitor-https-inbound.collection.js +16 -13
- package/collections/monitor-https-inbound.collection.js.map +1 -1
- package/collections/monitor-https-outbound.collection.js +18 -15
- package/collections/monitor-https-outbound.collection.js.map +1 -1
- package/collections/monitor-memory.collection.js +15 -12
- package/collections/monitor-memory.collection.js.map +1 -1
- package/collections/monitor-mongo.collection.js +15 -12
- package/collections/monitor-mongo.collection.js.map +1 -1
- package/collections/notification.collection.js +11 -8
- package/collections/notification.collection.js.map +1 -1
- package/collections/queue-flag.collection.js +12 -9
- package/collections/queue-flag.collection.js.map +1 -1
- package/collections/queue-method.collection.js +12 -9
- package/collections/queue-method.collection.js.map +1 -1
- package/collections/queue-response.collection.js +12 -9
- package/collections/queue-response.collection.js.map +1 -1
- package/collections/report-builder-dashboard-builder.collection.js +13 -10
- package/collections/report-builder-dashboard-builder.collection.js.map +1 -1
- package/collections/report-builder-library.collection.js +14 -11
- package/collections/report-builder-library.collection.js.map +1 -1
- package/collections/report-builder-report.collection.js +14 -11
- package/collections/report-builder-report.collection.js.map +1 -1
- package/collections/user-group.collection.js +14 -11
- package/collections/user-group.collection.js.map +1 -1
- package/collections/user-guide.collection.js +11 -8
- package/collections/user-guide.collection.js.map +1 -1
- package/collections/user.collection.js +15 -12
- package/collections/user.collection.js.map +1 -1
- package/cron/cron.js +25 -25
- package/cron/cron.js.map +1 -1
- package/fixtures/cron-jobs.js +80 -30
- package/fixtures/cron-jobs.js.map +1 -1
- package/fixtures/init.js +59 -9
- package/fixtures/init.js.map +1 -1
- package/http/auth.js +460 -344
- package/http/auth.js.map +1 -1
- package/http/health.js +5 -1
- package/http/health.js.map +1 -1
- package/http/home.js +11 -7
- package/http/home.js.map +1 -1
- package/index.js +98 -36
- package/index.js.map +1 -1
- package/managers/cron.manager.js +157 -78
- package/managers/cron.manager.js.map +1 -1
- package/managers/method.manager.js +302 -314
- package/managers/method.manager.js.map +1 -1
- package/managers/mongo.manager.js +1010 -741
- package/managers/mongo.manager.js.map +1 -1
- package/managers/monitor.manager.js +254 -171
- package/managers/monitor.manager.js.map +1 -1
- package/managers/queue-method.manager.js +166 -69
- package/managers/queue-method.manager.js.map +1 -1
- package/managers/subscription.manager.js +714 -515
- package/managers/subscription.manager.js.map +1 -1
- package/methods/accounts.js +183 -111
- package/methods/accounts.js.map +1 -1
- package/methods/aws.js +262 -156
- package/methods/aws.js.map +1 -1
- package/methods/cloudconvert.js +180 -100
- package/methods/cloudconvert.js.map +1 -1
- package/methods/collections.js +110 -103
- package/methods/collections.js.map +1 -1
- package/methods/counters.js +79 -29
- package/methods/counters.js.map +1 -1
- package/methods/cron-jobs.js +884 -819
- package/methods/cron-jobs.js.map +1 -1
- package/methods/flags.js +5 -1
- package/methods/flags.js.map +1 -1
- package/methods/logs.js +313 -258
- package/methods/logs.js.map +1 -1
- package/methods/monitor.js +348 -289
- package/methods/monitor.js.map +1 -1
- package/methods/pdf.js +340 -341
- package/methods/pdf.js.map +1 -1
- package/methods/report-builder.js +657 -565
- package/methods/report-builder.js.map +1 -1
- package/methods/support.js +185 -67
- package/methods/support.js.map +1 -1
- package/models/app-status.model.js +2 -1
- package/models/app-version.model.js +2 -1
- package/models/billing-logged-in-users.model.js +2 -1
- package/models/collection-document.model.js +2 -1
- package/models/counter.model.js +2 -1
- package/models/cron-job-history.model.js +2 -1
- package/models/cron-job.model.js +2 -1
- package/models/dialog.model.js +2 -1
- package/models/email-history.model.js +2 -1
- package/models/email-verified.model.js +2 -1
- package/models/file.model.js +2 -1
- package/models/flag.model.js +2 -1
- package/models/log-method-latency.model.js +2 -1
- package/models/log-subscription.model.js +2 -1
- package/models/log.model.js +2 -1
- package/models/logged-in-users.model.js +2 -1
- package/models/method-call.model.js +2 -1
- package/models/method-response.model.js +2 -1
- package/models/method.model.js +2 -1
- package/models/monitor-cpu.model.js +2 -1
- package/models/monitor-https-inbound.model.js +2 -1
- package/models/monitor-https-outbound.model.js +2 -1
- package/models/monitor-memory.model.js +2 -1
- package/models/monitor-mongo.model.js +2 -1
- package/models/notification.model.js +2 -1
- package/models/pagination.model.js +5 -2
- package/models/pagination.model.js.map +1 -1
- package/models/permission.model.js +2 -1
- package/models/queue-method.model.js +2 -1
- package/models/queue-response.model.js +2 -1
- package/models/report-builder-dashboard-builder.model.js +2 -1
- package/models/report-builder-library.model.js +2 -1
- package/models/report-builder-report.model.js +2 -1
- package/models/report-builder.model.js +2 -1
- package/models/select-data-label.model.js +2 -1
- package/models/server-response.model.js +2 -1
- package/models/subscription.model.js +2 -1
- package/models/support-ticket.model.js +2 -1
- package/models/user-group.model.js +2 -1
- package/models/user-guide.model.js +2 -1
- package/models/user.model.js +2 -1
- package/package.json +1 -1
- package/public_api.js +82 -70
- package/public_api.js.map +1 -1
- package/publications/app-status.js +8 -4
- package/publications/app-status.js.map +1 -1
- package/publications/app-version.js +8 -4
- package/publications/app-version.js.map +1 -1
- package/publications/cron-jobs.js +13 -9
- package/publications/cron-jobs.js.map +1 -1
- package/publications/files.js +15 -11
- package/publications/files.js.map +1 -1
- package/publications/flags.js +11 -7
- package/publications/flags.js.map +1 -1
- package/publications/logs.js +35 -31
- package/publications/logs.js.map +1 -1
- package/publications/method-calls.js +8 -4
- package/publications/method-calls.js.map +1 -1
- package/publications/method-responses.js +8 -4
- package/publications/method-responses.js.map +1 -1
- package/publications/notifications.js +8 -4
- package/publications/notifications.js.map +1 -1
- package/publications/report-builder-dashboard-builders.js +12 -8
- package/publications/report-builder-dashboard-builders.js.map +1 -1
- package/publications/report-builder-libraries.js +66 -16
- package/publications/report-builder-libraries.js.map +1 -1
- package/publications/report-builder-reports.js +21 -17
- package/publications/report-builder-reports.js.map +1 -1
- package/publications/super-admin.js +7 -3
- package/publications/super-admin.js.map +1 -1
- package/publications/user-groups.js +8 -4
- package/publications/user-groups.js.map +1 -1
- package/publications/user-guides.js +8 -4
- package/publications/user-guides.js.map +1 -1
- package/server-app.js +534 -393
- package/server-app.js.map +1 -1
- package/util/common.js +92 -55
- package/util/common.js.map +1 -1
- package/util/schema-report-builder.js +134 -76
- package/util/schema-report-builder.js.map +1 -1
package/publications/logs.js
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadLogPublications = void 0;
|
|
4
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
+
var log_collection_1 = require("../collections/log.collection");
|
|
6
|
+
var log_method_latency_collection_1 = require("../collections/log-method-latency.collection");
|
|
7
|
+
function loadLogPublications(subscriptionManager) {
|
|
5
8
|
subscriptionManager.publications({
|
|
6
9
|
logsWithType: {
|
|
7
|
-
function: (type)
|
|
10
|
+
function: function (type) {
|
|
8
11
|
if (type === 'all') {
|
|
9
|
-
return Logs.find({}, { sort: { createdAt: -1 } });
|
|
12
|
+
return log_collection_1.Logs.find({}, { sort: { createdAt: -1 } });
|
|
10
13
|
}
|
|
11
|
-
return Logs.find({ type: type }, { sort: { createdAt: -1 } });
|
|
14
|
+
return log_collection_1.Logs.find({ type: type }, { sort: { createdAt: -1 } });
|
|
12
15
|
},
|
|
13
|
-
check: new
|
|
16
|
+
check: new simpl_schema_1.default({
|
|
14
17
|
type: {
|
|
15
18
|
type: String
|
|
16
19
|
}
|
|
17
20
|
}),
|
|
18
21
|
collections: ['logs'],
|
|
19
|
-
fetchFunction: (document, type)
|
|
22
|
+
fetchFunction: function (document, type) {
|
|
20
23
|
return document['type'] === type;
|
|
21
24
|
}
|
|
22
25
|
},
|
|
23
26
|
logsWithTypes: {
|
|
24
|
-
function: (types)
|
|
25
|
-
return Logs.find({ type: { $in: types } }, { sort: { createdAt: -1 } });
|
|
27
|
+
function: function (types) {
|
|
28
|
+
return log_collection_1.Logs.find({ type: { $in: types } }, { sort: { createdAt: -1 } });
|
|
26
29
|
},
|
|
27
|
-
check: new
|
|
30
|
+
check: new simpl_schema_1.default({
|
|
28
31
|
types: {
|
|
29
32
|
type: Array
|
|
30
33
|
},
|
|
@@ -33,73 +36,74 @@ export function loadLogPublications(subscriptionManager) {
|
|
|
33
36
|
}
|
|
34
37
|
}),
|
|
35
38
|
collections: ['logs'],
|
|
36
|
-
fetchFunction: (document, types)
|
|
39
|
+
fetchFunction: function (document, types) {
|
|
37
40
|
return types.includes(document['type']);
|
|
38
41
|
}
|
|
39
42
|
},
|
|
40
43
|
logsWithIdDocument: {
|
|
41
|
-
function: (id_document)
|
|
42
|
-
return Logs.find({ id_document: id_document }, { sort: { createdAt: -1 } });
|
|
44
|
+
function: function (id_document) {
|
|
45
|
+
return log_collection_1.Logs.find({ id_document: id_document }, { sort: { createdAt: -1 } });
|
|
43
46
|
},
|
|
44
|
-
check: new
|
|
47
|
+
check: new simpl_schema_1.default({
|
|
45
48
|
id_document: {
|
|
46
49
|
type: String
|
|
47
50
|
}
|
|
48
51
|
}),
|
|
49
52
|
collections: ['logs'],
|
|
50
|
-
fetchFunction: (document, id_document)
|
|
53
|
+
fetchFunction: function (document, id_document) {
|
|
51
54
|
return document['id_document'] === id_document;
|
|
52
55
|
}
|
|
53
56
|
},
|
|
54
57
|
logsWithMethod: {
|
|
55
|
-
function: (method)
|
|
56
|
-
return Logs.find({ method: method }, { sort: { createdAt: -1 } });
|
|
58
|
+
function: function (method) {
|
|
59
|
+
return log_collection_1.Logs.find({ method: method }, { sort: { createdAt: -1 } });
|
|
57
60
|
},
|
|
58
|
-
check: new
|
|
61
|
+
check: new simpl_schema_1.default({
|
|
59
62
|
method: {
|
|
60
63
|
type: String
|
|
61
64
|
}
|
|
62
65
|
}),
|
|
63
66
|
collections: ['logs'],
|
|
64
|
-
fetchFunction: (document, method)
|
|
67
|
+
fetchFunction: function (document, method) {
|
|
65
68
|
return document['method'] === method;
|
|
66
69
|
}
|
|
67
70
|
},
|
|
68
71
|
logsWithRoute: {
|
|
69
|
-
function: (route)
|
|
70
|
-
return Logs.find({ route: route }, { sort: { createdAt: -1 } });
|
|
72
|
+
function: function (route) {
|
|
73
|
+
return log_collection_1.Logs.find({ route: route }, { sort: { createdAt: -1 } });
|
|
71
74
|
},
|
|
72
|
-
check: new
|
|
75
|
+
check: new simpl_schema_1.default({
|
|
73
76
|
route: {
|
|
74
77
|
type: String
|
|
75
78
|
}
|
|
76
79
|
}),
|
|
77
80
|
collections: ['logs'],
|
|
78
|
-
fetchFunction: (document, route)
|
|
81
|
+
fetchFunction: function (document, route) {
|
|
79
82
|
return document['route'] === route;
|
|
80
83
|
}
|
|
81
84
|
},
|
|
82
85
|
logsWithCollection: {
|
|
83
|
-
function: (collection)
|
|
84
|
-
return Logs.find({ collection: collection }, { sort: { createdAt: -1 } });
|
|
86
|
+
function: function (collection) {
|
|
87
|
+
return log_collection_1.Logs.find({ collection: collection }, { sort: { createdAt: -1 } });
|
|
85
88
|
},
|
|
86
|
-
check: new
|
|
89
|
+
check: new simpl_schema_1.default({
|
|
87
90
|
collection: {
|
|
88
91
|
type: String
|
|
89
92
|
}
|
|
90
93
|
}),
|
|
91
94
|
collections: ['logs'],
|
|
92
|
-
fetchFunction: (document, collection)
|
|
95
|
+
fetchFunction: function (document, collection) {
|
|
93
96
|
return document['collection'] === collection;
|
|
94
97
|
}
|
|
95
98
|
},
|
|
96
99
|
methodlatencies: {
|
|
97
|
-
function: ()
|
|
98
|
-
return LogMethodLatencies.find({}, { sort: { date_start: -1 } });
|
|
100
|
+
function: function () {
|
|
101
|
+
return log_method_latency_collection_1.LogMethodLatencies.find({}, { sort: { date_start: -1 } });
|
|
99
102
|
},
|
|
100
103
|
collections: ['log-method-latencies'],
|
|
101
104
|
},
|
|
102
105
|
});
|
|
103
106
|
}
|
|
107
|
+
exports.loadLogPublications = loadLogPublications;
|
|
104
108
|
|
|
105
109
|
//# sourceMappingURL=logs.js.map
|
package/publications/logs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/logs.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/publications/logs.ts"],"names":[],"mappings":"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","file":"logs.js","sourcesContent":["import SimpleSchema from 'simpl-schema';\nimport { Logs } from '../collections/log.collection';\nimport { SubscriptionManager } from '../managers/subscription.manager';\nimport { LogMethodLatencies } from '../collections/log-method-latency.collection';\nimport { LogSubscriptions } from '../collections/log-subscription.collection';\n\nexport function loadLogPublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\tlogsWithType: {\n\t\t\tfunction: (type: string) => { \n\t\t\t\tif (type === 'all') { \n\t\t\t\t\treturn Logs.find({}, {sort: {createdAt: -1}});\n\t\t\t\t}\n\t\t\t\treturn Logs.find({type: <any>type}, {sort: {createdAt: -1}});\n\t\t\t},\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\ttype: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcollections: ['logs'],\n\t\t\tfetchFunction: (document: Document, type: string) => {\n\t\t\t\treturn document['type'] === type;\n\t\t\t}\n\t\t},\n\t\tlogsWithTypes: {\n\t\t\tfunction: (types: string[]) => {\n\t\t\t\treturn Logs.find({type: {$in: <any>types}}, {sort: {createdAt: -1}});\n\t\t\t},\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\ttypes: {\n\t\t\t\t\ttype: Array\n\t\t\t\t},\n\t\t\t\t'types.$': {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcollections: ['logs'],\n\t\t\tfetchFunction: (document: Document, types: string[]) => {\n\t\t\t\treturn types.includes(document['type']);\n\t\t\t}\n\t\t},\n\t\tlogsWithIdDocument: {\n\t\t\tfunction: (id_document: string) => {\n\t\t\t\treturn Logs.find({id_document: id_document}, {sort: {createdAt: -1}});\n\t\t\t},\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_document: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcollections: ['logs'],\n\t\t\tfetchFunction: (document: Document, id_document: string) => {\n\t\t\t\treturn document['id_document'] === id_document;\n\t\t\t}\n\t\t},\n\t\tlogsWithMethod: {\n\t\t\tfunction: (method: string) => {\n\t\t\t\treturn Logs.find({method: method}, {sort: {createdAt: -1}});\n\t\t\t},\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tmethod: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcollections: ['logs'],\n\t\t\tfetchFunction: (document: Document, method: string) => {\n\t\t\t\treturn document['method'] === method;\n\t\t\t}\n\t\t},\n\t\tlogsWithRoute: {\n\t\t\tfunction: (route: string) => {\n\t\t\t\treturn Logs.find({route: route}, {sort: {createdAt: -1}});\n\t\t\t},\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\troute: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcollections: ['logs'],\n\t\t\tfetchFunction: (document: Document, route: string) => {\n\t\t\t\treturn document['route'] === route;\n\t\t\t}\n\t\t},\n\t\tlogsWithCollection: {\n\t\t\tfunction: (collection: string) => {\n\t\t\t\treturn Logs.find({collection: collection}, {sort: {createdAt: -1}});\n\t\t\t},\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tcollection: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcollections: ['logs'],\n\t\t\tfetchFunction: (document: Document, collection: string) => {\n\t\t\t\treturn document['collection'] === collection;\n\t\t\t}\n\t\t},\n\t\tmethodlatencies: {\n\t\t\tfunction: () => { \n\t\t\t\treturn LogMethodLatencies.find({}, {sort: {date_start: -1}});\n\t\t\t},\n\t\t\tcollections: ['log-method-latencies'],\n\t\t},\n\t\t// superadminAPM: {\n\t\t// \tcheck: new SimpleSchema({\n\t\t// \t\tdate_start: {\n\t\t// \t\t\ttype: Date\n\t\t// \t\t},\n\t\t// \t\tdate_end: {\n\t\t// \t\t\ttype: Date\n\t\t// \t\t}\n\t\t// \t}),\n\t\t// \tfunction: function(date_start: Date, date_end: Date) {\n\t\t// \t\treturn new Promise(async (resolve, reject) => {\n\t\t// \t\t\tlet latencies = await LogMethodLatencies.aggregate([\n\t\t// \t\t\t\t{\n\t\t// \t\t\t\t\t$match: {\n\t\t// \t\t\t\t\t\t$and: [\n\t\t// \t\t\t\t\t\t\t{\n\t\t// \t\t\t\t\t\t\t\tcreatedAt: {$gte: date_start}\n\t\t// \t\t\t\t\t\t\t},\n\t\t// \t\t\t\t\t\t\t{\n\t\t// \t\t\t\t\t\t\t\tcreatedAt: {$lte: date_end}\n\t\t// \t\t\t\t\t\t\t}\n\t\t// \t\t\t\t\t\t]\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\t{\n\t\t// \t\t\t\t\t$group: {\n\t\t// \t\t\t\t\t\t_id: '$method',\n\t\t// \t\t\t\t\t\tmethod: {$first: '$method'},\n\t\t// \t\t\t\t\t\tcount: {$sum: 1},\n\t\t// \t\t\t\t\t\tlatency_min: {$min: '$latency_ms'},\n\t\t// \t\t\t\t\t\tlatency_avg: {$avg: '$latency_ms'},\n\t\t// \t\t\t\t\t\tlatency_max: {$max: '$latency_ms'}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\t{\n\t\t// \t\t\t\t\t$sort: {\n\t\t// \t\t\t\t\t\tlatency_avg: -1\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\n\t\t// \t\t\t]);\n\n\t\t// \t\t\tlet subscriptions = await LogSubscriptions.aggregate([\n\t\t// \t\t\t\t{\n\t\t// \t\t\t\t\t$match: {\n\t\t// \t\t\t\t\t\t$and: [\n\t\t// \t\t\t\t\t\t\t{\n\t\t// \t\t\t\t\t\t\t\tcreatedAt: {$gte: date_start}\n\t\t// \t\t\t\t\t\t\t},\n\t\t// \t\t\t\t\t\t\t{\n\t\t// \t\t\t\t\t\t\t\tcreatedAt: {$lte: date_end}\n\t\t// \t\t\t\t\t\t\t}\n\t\t// \t\t\t\t\t\t]\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\t{\n\t\t// \t\t\t\t\t$group: {\n\t\t// \t\t\t\t\t\t_id: '$subscription',\n\t\t// \t\t\t\t\t\tsubscription: {$first: '$subscription'},\n\t\t// \t\t\t\t\t\tcount: {$sum: 1}\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t},\n\t\t// \t\t\t\t{\n\t\t// \t\t\t\t\t$sort: {\n\t\t// \t\t\t\t\t\tcount: -1\n\t\t// \t\t\t\t\t}\n\t\t// \t\t\t\t}\n\t\t// \t\t\t]);\n\n\t\t// \t\t\tresolve({\n\t\t// \t\t\t\tmethods: latencies,\n\t\t// \t\t\t\tsubscriptions: subscriptions\n\t\t// \t\t\t});\n\t\t// \t\t});\n\t\t// \t},\n\t\t// \tcollections: ['log-method-latencies', 'log-subscriptions'],\n\t\t// }\n\t});\n}"]}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadMethodCallsPublications = void 0;
|
|
4
|
+
var method_call_collection_1 = require("../collections/method-call.collection");
|
|
5
|
+
function loadMethodCallsPublications(subscriptionManager) {
|
|
3
6
|
subscriptionManager.publications({
|
|
4
7
|
methodcalls: {
|
|
5
|
-
function: ()
|
|
6
|
-
return MethodCalls.find({});
|
|
8
|
+
function: function () {
|
|
9
|
+
return method_call_collection_1.MethodCalls.find({});
|
|
7
10
|
},
|
|
8
11
|
collections: ['method-calls']
|
|
9
12
|
}
|
|
10
13
|
});
|
|
11
14
|
}
|
|
15
|
+
exports.loadMethodCallsPublications = loadMethodCallsPublications;
|
|
12
16
|
|
|
13
17
|
//# sourceMappingURL=method-calls.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/method-calls.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"sources":["../../src/publications/method-calls.ts"],"names":[],"mappings":";;;AACA,gFAAoE;AAEpE,SAAgB,2BAA2B,CAAC,mBAAwC;IACnF,mBAAmB,CAAC,YAAY,CAAC;QAChC,WAAW,EAAE;YACZ,QAAQ,EAAE;gBACT,OAAO,oCAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC7B,CAAC;YACD,WAAW,EAAE,CAAC,cAAc,CAAC;SAC7B;KACD,CAAC,CAAC;AACJ,CAAC;AATD,kEASC","file":"method-calls.js","sourcesContent":["import { SubscriptionManager } from '../managers/subscription.manager';\nimport { MethodCalls } from '../collections/method-call.collection';\n\nexport function loadMethodCallsPublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\tmethodcalls: {\n\t\t\tfunction: () => {\n\t\t\t\treturn MethodCalls.find({});\n\t\t\t},\n\t\t\tcollections: ['method-calls']\n\t\t}\n\t});\n}"]}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadMethodResponsePublications = void 0;
|
|
4
|
+
var method_response_collection_1 = require("../collections/method-response.collection");
|
|
5
|
+
function loadMethodResponsePublications(subscriptionManager) {
|
|
3
6
|
subscriptionManager.publications({
|
|
4
7
|
methodresponses: {
|
|
5
|
-
function: ()
|
|
6
|
-
return MethodResponses.find({});
|
|
8
|
+
function: function () {
|
|
9
|
+
return method_response_collection_1.MethodResponses.find({});
|
|
7
10
|
},
|
|
8
11
|
collections: ['method-responses']
|
|
9
12
|
}
|
|
10
13
|
});
|
|
11
14
|
}
|
|
15
|
+
exports.loadMethodResponsePublications = loadMethodResponsePublications;
|
|
12
16
|
|
|
13
17
|
//# sourceMappingURL=method-responses.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/method-responses.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"sources":["../../src/publications/method-responses.ts"],"names":[],"mappings":";;;AACA,wFAA4E;AAE5E,SAAgB,8BAA8B,CAAC,mBAAwC;IACtF,mBAAmB,CAAC,YAAY,CAAC;QAChC,eAAe,EAAE;YAChB,QAAQ,EAAE;gBACT,OAAO,4CAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjC,CAAC;YACD,WAAW,EAAE,CAAC,kBAAkB,CAAC;SACjC;KACD,CAAC,CAAC;AACJ,CAAC;AATD,wEASC","file":"method-responses.js","sourcesContent":["import { SubscriptionManager } from '../managers/subscription.manager';\nimport { MethodResponses } from '../collections/method-response.collection';\n\nexport function loadMethodResponsePublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\tmethodresponses: {\n\t\t\tfunction: () => {\n\t\t\t\treturn MethodResponses.find({});\n\t\t\t},\n\t\t\tcollections: ['method-responses']\n\t\t}\n\t});\n}"]}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadNotificationPublications = void 0;
|
|
4
|
+
var notification_collection_1 = require("../collections/notification.collection");
|
|
5
|
+
function loadNotificationPublications(subscriptionManager) {
|
|
3
6
|
subscriptionManager.publications({
|
|
4
7
|
notifications: {
|
|
5
|
-
function: ()
|
|
6
|
-
return Notifications.find({}, { sort: { name: 1 } });
|
|
8
|
+
function: function () {
|
|
9
|
+
return notification_collection_1.Notifications.find({}, { sort: { name: 1 } });
|
|
7
10
|
},
|
|
8
11
|
collections: ['notifications']
|
|
9
12
|
}
|
|
10
13
|
});
|
|
11
14
|
}
|
|
15
|
+
exports.loadNotificationPublications = loadNotificationPublications;
|
|
12
16
|
|
|
13
17
|
//# sourceMappingURL=notifications.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/notifications.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/publications/notifications.ts"],"names":[],"mappings":";;;AAAA,kFAAuE;AAGvE,SAAgB,4BAA4B,CAAC,mBAAwC;IACpF,mBAAmB,CAAC,YAAY,CAAC;QAChC,aAAa,EAAE;YACd,QAAQ,EAAE;gBACT,OAAO,uCAAa,CAAC,IAAI,CAAC,EAAE,EAAE,EAAC,IAAI,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,EAAC,CAAC,CAAC;YAClD,CAAC;YACD,WAAW,EAAE,CAAC,eAAe,CAAC;SAC9B;KACD,CAAC,CAAC;AACJ,CAAC;AATD,oEASC","file":"notifications.js","sourcesContent":["import { Notifications } from '../collections/notification.collection';\nimport { SubscriptionManager } from '../managers/subscription.manager';\n\nexport function loadNotificationPublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\tnotifications: {\n\t\t\tfunction: () => {\n\t\t\t\treturn Notifications.find({}, {sort: {name: 1}});\n\t\t\t},\n\t\t\tcollections: ['notifications']\n\t\t}\n\t});\n}"]}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadReportBuilderDashboardBuilderPublications = void 0;
|
|
4
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
+
var report_builder_dashboard_builder_collection_1 = require("../collections/report-builder-dashboard-builder.collection");
|
|
6
|
+
function loadReportBuilderDashboardBuilderPublications(subscriptionManager) {
|
|
4
7
|
subscriptionManager.publications({
|
|
5
8
|
reportbuilderdashboards: {
|
|
6
|
-
function: ()
|
|
7
|
-
return ReportBuilderDashboardBuilders.find({}, { sort: { name: 1 } });
|
|
9
|
+
function: function () {
|
|
10
|
+
return report_builder_dashboard_builder_collection_1.ReportBuilderDashboardBuilders.find({}, { sort: { name: 1 } });
|
|
8
11
|
},
|
|
9
12
|
collections: ['report-builder-dashboard-builders']
|
|
10
13
|
},
|
|
11
14
|
reportbuilderdashboardWithId: {
|
|
12
|
-
check: new
|
|
15
|
+
check: new simpl_schema_1.default({
|
|
13
16
|
id_dashboard: {
|
|
14
17
|
type: String
|
|
15
18
|
}
|
|
16
19
|
}),
|
|
17
|
-
function: (id_dashboard)
|
|
18
|
-
return ReportBuilderDashboardBuilders.aggregate([
|
|
20
|
+
function: function (id_dashboard) {
|
|
21
|
+
return report_builder_dashboard_builder_collection_1.ReportBuilderDashboardBuilders.aggregate([
|
|
19
22
|
{
|
|
20
23
|
$match: {
|
|
21
24
|
_id: id_dashboard
|
|
@@ -35,5 +38,6 @@ export function loadReportBuilderDashboardBuilderPublications(subscriptionManage
|
|
|
35
38
|
}
|
|
36
39
|
});
|
|
37
40
|
}
|
|
41
|
+
exports.loadReportBuilderDashboardBuilderPublications = loadReportBuilderDashboardBuilderPublications;
|
|
38
42
|
|
|
39
43
|
//# sourceMappingURL=report-builder-dashboard-builders.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/report-builder-dashboard-builders.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/publications/report-builder-dashboard-builders.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AAExC,0HAA4G;AAE5G,SAAgB,6CAA6C,CAAC,mBAAwC;IACrG,mBAAmB,CAAC,YAAY,CAAC;QAChC,uBAAuB,EAAE;YACxB,QAAQ,EAAE;gBACT,OAAO,4EAA8B,CAAC,IAAI,CAAC,EAAE,EAAE,EAAC,IAAI,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,EAAC,CAAC,CAAC;YACnE,CAAC;YACD,WAAW,EAAE,CAAC,mCAAmC,CAAC;SAClD;QACD,4BAA4B,EAAE;YAC7B,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,YAAY,EAAE;oBACb,IAAI,EAAE,MAAM;iBACZ;aACD,CAAC;YACF,QAAQ,EAAE,UAAC,YAAoB;gBAC9B,OAAO,4EAA8B,CAAC,SAAS,CAAC;oBAC/C;wBACC,MAAM,EAAE;4BACP,GAAG,EAAE,YAAY;yBACjB;qBACD;oBACD;wBACC,OAAO,EAAE;4BACR,IAAI,EAAE,wBAAwB;4BAC9B,UAAU,EAAE,sCAAsC;4BAClD,YAAY,EAAE,KAAK;4BACnB,EAAE,EAAE,wBAAwB;yBAC5B;qBACD;iBACD,CAAC,CAAC;YACJ,CAAC;YACD,WAAW,EAAE,CAAC,mCAAmC,CAAC;SAClD;KACD,CAAC,CAAC;AACJ,CAAC;AAlCD,sGAkCC","file":"report-builder-dashboard-builders.js","sourcesContent":["import SimpleSchema from 'simpl-schema';\nimport { SubscriptionManager } from '../managers/subscription.manager';\nimport { ReportBuilderDashboardBuilders } from '../collections/report-builder-dashboard-builder.collection';\n\nexport function loadReportBuilderDashboardBuilderPublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\treportbuilderdashboards: {\n\t\t\tfunction: () => {\n\t\t\t\treturn ReportBuilderDashboardBuilders.find({}, {sort: {name: 1}});\n\t\t\t},\n\t\t\tcollections: ['report-builder-dashboard-builders']\n\t\t},\n\t\treportbuilderdashboardWithId: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_dashboard: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: (id_dashboard: string) => {\n\t\t\t\treturn ReportBuilderDashboardBuilders.aggregate([\n\t\t\t\t\t{\n\t\t\t\t\t\t$match: {\n\t\t\t\t\t\t\t_id: id_dashboard\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t$lookup: {\n\t\t\t\t\t\t\tfrom: 'report-builder-reports',\n\t\t\t\t\t\t\tlocalField: 'report_rows.report_columns.id_report',\n\t\t\t\t\t\t\tforeignField: '_id',\n\t\t\t\t\t\t\tas: 'dbReportBuilderReports'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]);\n\t\t\t},\n\t\t\tcollections: ['report-builder-dashboard-builders']\n\t\t}\n\t});\n}"]}
|
|
@@ -1,40 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.loadReportBuilderLibraryPublications = void 0;
|
|
40
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
41
|
+
var report_builder_library_collection_1 = require("../collections/report-builder-library.collection");
|
|
42
|
+
var user_collection_1 = require("../collections/user.collection");
|
|
43
|
+
var user_group_collection_1 = require("../collections/user-group.collection");
|
|
44
|
+
function loadReportBuilderLibraryPublications(subscriptionManager) {
|
|
45
|
+
var _this = this;
|
|
6
46
|
subscriptionManager.publications({
|
|
7
47
|
reportbuilderlibraries: {
|
|
8
|
-
function: ()
|
|
9
|
-
return ReportBuilderLibraries.find({}, { sort: { name: 1 } });
|
|
48
|
+
function: function () {
|
|
49
|
+
return report_builder_library_collection_1.ReportBuilderLibraries.find({}, { sort: { name: 1 } });
|
|
10
50
|
},
|
|
11
51
|
collections: ['report-builder-libraries']
|
|
12
52
|
},
|
|
13
53
|
reportbuilderlibrariesWithIdUser: {
|
|
14
|
-
check: new
|
|
54
|
+
check: new simpl_schema_1.default({
|
|
15
55
|
id_user: {
|
|
16
56
|
type: String
|
|
17
57
|
}
|
|
18
58
|
}),
|
|
19
|
-
function: (id_user)
|
|
20
|
-
return ReportBuilderLibraries.find({ id_user_create: id_user }, { sort: { name: 1 } });
|
|
59
|
+
function: function (id_user) {
|
|
60
|
+
return report_builder_library_collection_1.ReportBuilderLibraries.find({ id_user_create: id_user }, { sort: { name: 1 } });
|
|
21
61
|
},
|
|
22
62
|
collections: ['users', 'report-builder-libraries']
|
|
23
63
|
},
|
|
24
64
|
reportbuilderlibrariesForUser: {
|
|
25
|
-
check: new
|
|
65
|
+
check: new simpl_schema_1.default({
|
|
26
66
|
id_user: {
|
|
27
67
|
type: String
|
|
28
68
|
}
|
|
29
69
|
}),
|
|
30
|
-
function:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
70
|
+
function: function (id_user) { return __awaiter(_this, void 0, void 0, function () {
|
|
71
|
+
var user, userGroups;
|
|
72
|
+
return __generator(this, function (_a) {
|
|
73
|
+
switch (_a.label) {
|
|
74
|
+
case 0: return [4 /*yield*/, user_collection_1.Users.findById(id_user)];
|
|
75
|
+
case 1:
|
|
76
|
+
user = _a.sent();
|
|
77
|
+
return [4 /*yield*/, user_group_collection_1.UserGroups.find({ name: { $in: user.roles.groups.map(function (a) { return a.name; }) } })];
|
|
78
|
+
case 2:
|
|
79
|
+
userGroups = _a.sent();
|
|
80
|
+
return [2 /*return*/, report_builder_library_collection_1.ReportBuilderLibraries.find({ 'user_groups.id_user_group': { $in: userGroups.map(function (a) { return a._id; }) } }, { sort: { name: 1 } })];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}); },
|
|
35
84
|
collections: ['users', 'report-builder-libraries']
|
|
36
85
|
},
|
|
37
86
|
});
|
|
38
87
|
}
|
|
88
|
+
exports.loadReportBuilderLibraryPublications = loadReportBuilderLibraryPublications;
|
|
39
89
|
|
|
40
90
|
//# sourceMappingURL=report-builder-libraries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/report-builder-libraries.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/publications/report-builder-libraries.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAwC;AAExC,sGAA0F;AAC1F,kEAAuD;AACvD,8EAAkE;AAElE,SAAgB,oCAAoC,CAAC,mBAAwC;IAA7F,iBAkCC;IAjCA,mBAAmB,CAAC,YAAY,CAAC;QAChC,sBAAsB,EAAE;YACvB,QAAQ,EAAE;gBACT,OAAO,0DAAsB,CAAC,IAAI,CAAC,EAAE,EAAE,EAAC,IAAI,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,EAAC,CAAC,CAAC;YAC3D,CAAC;YACD,WAAW,EAAE,CAAC,0BAA0B,CAAC;SACzC;QACD,gCAAgC,EAAE;YACjC,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,OAAO,EAAE;oBACR,IAAI,EAAE,MAAM;iBACZ;aACD,CAAC;YACF,QAAQ,EAAE,UAAC,OAAe;gBACzB,OAAO,0DAAsB,CAAC,IAAI,CAAC,EAAC,cAAc,EAAE,OAAO,EAAC,EAAE,EAAC,IAAI,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,EAAC,CAAC,CAAC;YAClF,CAAC;YACD,WAAW,EAAE,CAAC,OAAO,EAAE,0BAA0B,CAAC;SAClD;QACD,6BAA6B,EAAE;YAC9B,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,OAAO,EAAE;oBACR,IAAI,EAAE,MAAM;iBACZ;aACD,CAAC;YACF,QAAQ,EAAE,UAAO,OAAe;;;;gCACpB,qBAAM,uBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAA;;4BAApC,IAAI,GAAG,SAA6B;4BACvB,qBAAM,kCAAU,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE,EAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,IAAI,EAAN,CAAM,CAAC,EAAC,EAAC,CAAC,EAAA;;4BAArF,UAAU,GAAG,SAAwE;4BAEzF,sBAAO,0DAAsB,CAAC,IAAI,CAAC,EAAC,2BAA2B,EAAE,EAAC,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,GAAG,EAAL,CAAK,CAAC,EAAC,EAAC,EAAE,EAAC,IAAI,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,EAAC,CAAC,EAAC;;;iBACxH;YACD,WAAW,EAAE,CAAC,OAAO,EAAE,0BAA0B,CAAC;SAClD;KACD,CAAC,CAAC;AACJ,CAAC;AAlCD,oFAkCC","file":"report-builder-libraries.js","sourcesContent":["import SimpleSchema from 'simpl-schema';\nimport { SubscriptionManager } from '../managers/subscription.manager';\nimport { ReportBuilderLibraries } from '../collections/report-builder-library.collection';\nimport { Users } from '../collections/user.collection';\nimport { UserGroups } from '../collections/user-group.collection';\n\nexport function loadReportBuilderLibraryPublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\treportbuilderlibraries: {\n\t\t\tfunction: () => {\n\t\t\t\treturn ReportBuilderLibraries.find({}, {sort: {name: 1}});\n\t\t\t},\n\t\t\tcollections: ['report-builder-libraries']\n\t\t},\n\t\treportbuilderlibrariesWithIdUser: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_user: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: (id_user: string) => {\n\t\t\t\treturn ReportBuilderLibraries.find({id_user_create: id_user}, {sort: {name: 1}});\n\t\t\t},\n\t\t\tcollections: ['users', 'report-builder-libraries']\n\t\t},\n\t\treportbuilderlibrariesForUser: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_user: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: async (id_user: string) => {\n\t\t\t\tlet user = await Users.findById(id_user);\n\t\t\t\tlet userGroups = await UserGroups.find({name: {$in: user.roles.groups.map(a => a.name)}});\n\n\t\t\t\treturn ReportBuilderLibraries.find({'user_groups.id_user_group': {$in: userGroups.map(a => a._id)}}, {sort: {name: 1}});\n\t\t\t},\n\t\t\tcollections: ['users', 'report-builder-libraries']\n\t\t},\n\t});\n}"]}
|
|
@@ -1,56 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadReportBuilderReportPublications = void 0;
|
|
4
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
+
var report_builder_report_collection_1 = require("../collections/report-builder-report.collection");
|
|
6
|
+
function loadReportBuilderReportPublications(subscriptionManager) {
|
|
4
7
|
subscriptionManager.publications({
|
|
5
8
|
reportbuilderreports: {
|
|
6
|
-
function: ()
|
|
7
|
-
return ReportBuilderReports.find({}, { sort: { report_name: 1 } });
|
|
9
|
+
function: function () {
|
|
10
|
+
return report_builder_report_collection_1.ReportBuilderReports.find({}, { sort: { report_name: 1 } });
|
|
8
11
|
},
|
|
9
12
|
collections: ['report-builder-reports']
|
|
10
13
|
},
|
|
11
14
|
reportbuilderreportsWithIdUser: {
|
|
12
|
-
check: new
|
|
15
|
+
check: new simpl_schema_1.default({
|
|
13
16
|
id_user: {
|
|
14
17
|
type: String
|
|
15
18
|
}
|
|
16
19
|
}),
|
|
17
|
-
function: (id_user)
|
|
18
|
-
return ReportBuilderReports.find({ id_user: id_user });
|
|
20
|
+
function: function (id_user) {
|
|
21
|
+
return report_builder_report_collection_1.ReportBuilderReports.find({ id_user: id_user });
|
|
19
22
|
},
|
|
20
23
|
collections: ['report-builder-reports'],
|
|
21
|
-
fetchFunction: (document, id_user)
|
|
24
|
+
fetchFunction: function (document, id_user) {
|
|
22
25
|
return document['id_user'] === id_user;
|
|
23
26
|
}
|
|
24
27
|
},
|
|
25
28
|
reportbuilderreportWithId: {
|
|
26
|
-
check: new
|
|
29
|
+
check: new simpl_schema_1.default({
|
|
27
30
|
id: {
|
|
28
31
|
type: String
|
|
29
32
|
}
|
|
30
33
|
}),
|
|
31
|
-
function: (id)
|
|
32
|
-
return ReportBuilderReports.findOne({ _id: id });
|
|
34
|
+
function: function (id) {
|
|
35
|
+
return report_builder_report_collection_1.ReportBuilderReports.findOne({ _id: id });
|
|
33
36
|
},
|
|
34
37
|
collections: ['report-builder-reports'],
|
|
35
|
-
fetchFunction: (document, id)
|
|
38
|
+
fetchFunction: function (document, id) {
|
|
36
39
|
return document._id === id;
|
|
37
40
|
}
|
|
38
41
|
},
|
|
39
42
|
reportbuilderreportsWithCustomerId: {
|
|
40
|
-
check: new
|
|
43
|
+
check: new simpl_schema_1.default({
|
|
41
44
|
id: {
|
|
42
45
|
type: String
|
|
43
46
|
}
|
|
44
47
|
}),
|
|
45
|
-
function: (id)
|
|
46
|
-
return ReportBuilderReports.find({ shared_users: id });
|
|
48
|
+
function: function (id) {
|
|
49
|
+
return report_builder_report_collection_1.ReportBuilderReports.find({ shared_users: id });
|
|
47
50
|
},
|
|
48
51
|
collections: ['report-builder-reports'],
|
|
49
|
-
fetchFunction: (document, id)
|
|
52
|
+
fetchFunction: function (document, id) {
|
|
50
53
|
return document['shared_users'].includes(id);
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
});
|
|
54
57
|
}
|
|
58
|
+
exports.loadReportBuilderReportPublications = loadReportBuilderReportPublications;
|
|
55
59
|
|
|
56
60
|
//# sourceMappingURL=report-builder-reports.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/report-builder-reports.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/publications/report-builder-reports.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AACxC,oGAAuF;AAIvF,SAAgB,mCAAmC,CAAC,mBAAwC;IAC3F,mBAAmB,CAAC,YAAY,CAAC;QAChC,oBAAoB,EAAE;YACrB,QAAQ,EAAE;gBACT,OAAO,uDAAoB,CAAC,IAAI,CAAC,EAAE,EAAE,EAAC,IAAI,EAAE,EAAC,WAAW,EAAE,CAAC,EAAC,EAAC,CAAC,CAAC;YAChE,CAAC;YACD,WAAW,EAAE,CAAC,wBAAwB,CAAC;SACvC;QACD,8BAA8B,EAAE;YAC/B,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,OAAO,EAAE;oBACR,IAAI,EAAE,MAAM;iBACZ;aACD,CAAC;YACF,QAAQ,EAAE,UAAC,OAAe;gBACzB,OAAO,uDAAoB,CAAC,IAAI,CAAC,EAAC,OAAO,EAAG,OAAO,EAAC,CAAC,CAAC;YACvD,CAAC;YACD,WAAW,EAAE,CAAC,wBAAwB,CAAC;YACvC,aAAa,EAAE,UAAC,QAA4B,EAAE,OAAe;gBAC5D,OAAO,QAAQ,CAAC,SAAS,CAAC,KAAK,OAAO,CAAC;YACxC,CAAC;SACD;QACD,yBAAyB,EAAE;YAC1B,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,EAAE,EAAE;oBACH,IAAI,EAAE,MAAM;iBACZ;aACD,CAAC;YACF,QAAQ,EAAE,UAAC,EAAU;gBACpB,OAAO,uDAAoB,CAAC,OAAO,CAAC,EAAC,GAAG,EAAE,EAAE,EAAC,CAAC,CAAC;YAChD,CAAC;YACD,WAAW,EAAE,CAAC,wBAAwB,CAAC;YACvC,aAAa,EAAE,UAAC,QAA4B,EAAE,EAAU;gBACvD,OAAO,QAAQ,CAAC,GAAG,KAAK,EAAE,CAAC;YAC5B,CAAC;SACD;QACD,kCAAkC,EAAE;YACnC,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,EAAE,EAAE;oBACH,IAAI,EAAE,MAAM;iBACZ;aACD,CAAC;YACF,QAAQ,EAAE,UAAC,EAAU;gBACpB,OAAO,uDAAoB,CAAC,IAAI,CAAC,EAAC,YAAY,EAAE,EAAE,EAAC,CAAC,CAAC;YACtD,CAAC;YACD,WAAW,EAAE,CAAC,wBAAwB,CAAC;YACvC,aAAa,EAAE,UAAC,QAA4B,EAAE,EAAU;gBACvD,OAAO,QAAQ,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC9C,CAAC;SACD;KACD,CAAC,CAAC;AACJ,CAAC;AAnDD,kFAmDC","file":"report-builder-reports.js","sourcesContent":["import SimpleSchema from 'simpl-schema';\nimport { ReportBuilderReports } from '../collections/report-builder-report.collection';\nimport { CollectionDocument } from '../models/collection-document.model';\nimport { SubscriptionManager } from '../managers/subscription.manager';\n\nexport function loadReportBuilderReportPublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\treportbuilderreports: {\n\t\t\tfunction: () => {\n\t\t\t\treturn ReportBuilderReports.find({}, {sort: {report_name: 1}});\n\t\t\t},\n\t\t\tcollections: ['report-builder-reports']\n\t\t},\n\t\treportbuilderreportsWithIdUser: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_user: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: (id_user: string) => {\n\t\t\t\treturn ReportBuilderReports.find({id_user : id_user});\n\t\t\t},\n\t\t\tcollections: ['report-builder-reports'],\n\t\t\tfetchFunction: (document: CollectionDocument, id_user: string) => {\n\t\t\t\treturn document['id_user'] === id_user;\n\t\t\t}\n\t\t},\n\t\treportbuilderreportWithId: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: (id: string) => {\n\t\t\t\treturn ReportBuilderReports.findOne({_id: id});\n\t\t\t},\n\t\t\tcollections: ['report-builder-reports'],\n\t\t\tfetchFunction: (document: CollectionDocument, id: string) => {\n\t\t\t\treturn document._id === id;\n\t\t\t}\n\t\t},\n\t\treportbuilderreportsWithCustomerId: {\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfunction: (id: string) => {\n\t\t\t\treturn ReportBuilderReports.find({shared_users: id});\n\t\t\t},\n\t\t\tcollections: ['report-builder-reports'],\n\t\t\tfetchFunction: (document: CollectionDocument, id: string) => {\n\t\t\t\treturn document['shared_users'].includes(id);\n\t\t\t}\n\t\t}\n\t});\n}"]}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadSuperAdminPublications = void 0;
|
|
4
|
+
var logged_in_users_collection_1 = require("../collections/logged-in-users.collection");
|
|
5
|
+
function loadSuperAdminPublications(subscriptionManager) {
|
|
3
6
|
subscriptionManager.publications({
|
|
4
7
|
loggedInUsers: {
|
|
5
8
|
function: function () {
|
|
6
|
-
return LoggedInUsers.find({}, { sort: { user: 1 } });
|
|
9
|
+
return logged_in_users_collection_1.LoggedInUsers.find({}, { sort: { user: 1 } });
|
|
7
10
|
},
|
|
8
11
|
collections: ['logged-in-users']
|
|
9
12
|
}
|
|
10
13
|
});
|
|
11
14
|
}
|
|
15
|
+
exports.loadSuperAdminPublications = loadSuperAdminPublications;
|
|
12
16
|
|
|
13
17
|
//# sourceMappingURL=super-admin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/super-admin.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"sources":["../../src/publications/super-admin.ts"],"names":[],"mappings":";;;AACA,wFAA0E;AAE1E,SAAgB,0BAA0B,CAAC,mBAAwC;IAClF,mBAAmB,CAAC,YAAY,CAAC;QAChC,aAAa,EAAE;YACd,QAAQ,EAAE;gBACT,OAAO,0CAAa,CAAC,IAAI,CAAC,EAAE,EAAE,EAAC,IAAI,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,EAAC,CAAC,CAAC;YAClD,CAAC;YACD,WAAW,EAAE,CAAC,iBAAiB,CAAC;SAChC;KACD,CAAC,CAAC;AACJ,CAAC;AATD,gEASC","file":"super-admin.js","sourcesContent":["import { SubscriptionManager } from '../managers/subscription.manager';\nimport { LoggedInUsers } from '../collections/logged-in-users.collection';\n\nexport function loadSuperAdminPublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\tloggedInUsers: {\n\t\t\tfunction: function() {\n\t\t\t\treturn LoggedInUsers.find({}, {sort: {user: 1}});\n\t\t\t},\n\t\t\tcollections: ['logged-in-users']\n\t\t}\n\t});\n}"]}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadUserGroupPublications = void 0;
|
|
4
|
+
var user_group_collection_1 = require("../collections/user-group.collection");
|
|
5
|
+
function loadUserGroupPublications(subscriptionManager) {
|
|
3
6
|
subscriptionManager.publications({
|
|
4
7
|
usergroups: {
|
|
5
|
-
function: ()
|
|
6
|
-
return UserGroups.find({}, { sort: { name: 1 } });
|
|
8
|
+
function: function () {
|
|
9
|
+
return user_group_collection_1.UserGroups.find({}, { sort: { name: 1 } });
|
|
7
10
|
},
|
|
8
11
|
collections: ['user-groups']
|
|
9
12
|
}
|
|
10
13
|
});
|
|
11
14
|
}
|
|
15
|
+
exports.loadUserGroupPublications = loadUserGroupPublications;
|
|
12
16
|
|
|
13
17
|
//# sourceMappingURL=user-groups.js.map
|