@resolveio/server-lib 12.5.52 → 12.5.54
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/.nodemon.json +5 -0
- package/.vscode/settings.json +3 -0
- package/README.md +22 -0
- package/compileDTS.pl +64 -0
- package/gulpfile.js +127 -0
- package/mongodbensurers.js +2 -0
- package/mongostop.js +3 -0
- package/package.json +1 -1
- package/settings.development.json +13 -0
- package/src/client-server-app.ts +7 -0
- package/src/collections/app-status.collection.ts +51 -0
- package/src/collections/counter.collection.ts +54 -0
- package/src/collections/cron-job-history.collection.ts +82 -0
- package/src/collections/cron-job.collection.ts +85 -0
- package/src/collections/email-history.collection.ts +66 -0
- package/src/collections/email-verified.collection.ts +61 -0
- package/src/collections/file.collection.ts +73 -0
- package/src/collections/flag.collection.ts +56 -0
- package/src/collections/log-method-latency.collection.ts +64 -0
- package/src/collections/log-subscription.collection.ts +68 -0
- package/src/collections/log-ts.collection.ts +78 -0
- package/src/collections/log.collection.ts +77 -0
- package/src/collections/logged-in-users.collection.ts +65 -0
- package/src/collections/method-response.collection.ts +66 -0
- package/src/collections/monitor-cpu.collection.ts +63 -0
- package/src/collections/monitor-memory.collection.ts +75 -0
- package/src/collections/monitor-mongo.collection.ts +69 -0
- package/src/collections/notification.collection.ts +51 -0
- package/src/collections/report-builder-dashboard-builder.collection.ts +109 -0
- package/src/collections/report-builder-library.collection.ts +89 -0
- package/src/collections/report-builder-report.collection.ts +149 -0
- package/src/collections/user-group.collection.ts +90 -0
- package/src/collections/user-guide.collection.ts +57 -0
- package/src/collections/user.collection.ts +259 -0
- package/src/cron/cron.ts +188 -0
- package/src/fixtures/cron-jobs.ts +25 -0
- package/src/fixtures/init.ts +10 -0
- package/src/http/auth.ts +732 -0
- package/src/http/health.ts +7 -0
- package/src/http/home.ts +71 -0
- package/src/index.ts +71 -0
- package/src/managers/cron.manager.ts +208 -0
- package/src/managers/method.manager.ts +607 -0
- package/src/managers/mongo.manager.ts +2282 -0
- package/src/managers/monitor.manager.ts +323 -0
- package/src/managers/subscription.manager.ts +1196 -0
- package/{managers/subscription.performance.js → src/managers/subscription.performance.ts} +68 -33
- package/src/methods/accounts.ts +202 -0
- package/src/methods/aws.ts +507 -0
- package/src/methods/collections.ts +512 -0
- package/src/methods/counters.ts +75 -0
- package/src/methods/cron-jobs.ts +1454 -0
- package/src/methods/flags.ts +7 -0
- package/src/methods/logs.ts +327 -0
- package/src/methods/monitor.ts +548 -0
- package/src/methods/pdf.ts +615 -0
- package/src/methods/report-builder.ts +876 -0
- package/src/methods/support.ts +146 -0
- package/{models/app-status.model.d.ts → src/models/app-status.model.ts} +3 -2
- package/{models/billing-logged-in-users.model.d.ts → src/models/billing-logged-in-users.model.ts} +5 -4
- package/src/models/collection-document.model.ts +22 -0
- package/{models/counter.model.d.ts → src/models/counter.model.ts} +4 -3
- package/src/models/cron-job-history.model.ts +13 -0
- package/src/models/cron-job.model.ts +14 -0
- package/src/models/dialog.model.ts +25 -0
- package/{models/email-history.model.d.ts → src/models/email-history.model.ts} +8 -7
- package/{models/email-verified.model.d.ts → src/models/email-verified.model.ts} +6 -5
- package/{models/file.model.d.ts → src/models/file.model.ts} +8 -7
- package/{models/flag.model.d.ts → src/models/flag.model.ts} +4 -3
- package/{models/log-method-latency.model.d.ts → src/models/log-method-latency.model.ts} +5 -4
- package/{models/log-subscription.model.d.ts → src/models/log-subscription.model.ts} +8 -6
- package/{models/log.model.d.ts → src/models/log.model.ts} +12 -10
- package/{models/logged-in-users.model.d.ts → src/models/logged-in-users.model.ts} +6 -5
- package/{models/method-response.model.d.ts → src/models/method-response.model.ts} +7 -6
- package/src/models/method.model.ts +11 -0
- package/{models/monitor-cpu.model.d.ts → src/models/monitor-cpu.model.ts} +9 -7
- package/src/models/monitor-memory.model.ts +17 -0
- package/src/models/monitor-mongo.model.ts +15 -0
- package/{models/notification.model.d.ts → src/models/notification.model.ts} +3 -2
- package/src/models/pagination.model.ts +30 -0
- package/src/models/permission.model.ts +14 -0
- package/src/models/report-builder-dashboard-builder.model.ts +29 -0
- package/src/models/report-builder-library.model.ts +20 -0
- package/src/models/report-builder-report.model.ts +110 -0
- package/src/models/report-builder.model.ts +68 -0
- package/src/models/select-data-label.model.ts +9 -0
- package/src/models/server-response.model.ts +5 -0
- package/src/models/subscription.model.ts +64 -0
- package/src/models/support-ticket.model.ts +81 -0
- package/src/models/user-group.model.ts +23 -0
- package/{models/user-guide.model.d.ts → src/models/user-guide.model.ts} +5 -4
- package/src/models/user.model.ts +79 -0
- package/{public_api.d.ts → src/public_api.ts} +1 -1
- package/src/publications/app-status.ts +13 -0
- package/src/publications/cron-jobs.ts +30 -0
- package/src/publications/files.ts +34 -0
- package/src/publications/flags.ts +20 -0
- package/src/publications/logs.ts +164 -0
- package/src/publications/method-responses.ts +13 -0
- package/src/publications/notifications.ts +13 -0
- package/src/publications/report-builder-dashboard-builders.ts +39 -0
- package/src/publications/report-builder-libraries.ts +41 -0
- package/src/publications/report-builder-reports.ts +48 -0
- package/src/publications/super-admin.ts +13 -0
- package/src/publications/user-groups.ts +12 -0
- package/src/publications/user-guides.ts +12 -0
- package/src/server-app.ts +769 -0
- package/src/util/common.ts +519 -0
- package/src/util/schema-report-builder.ts +413 -0
- package/tsconfig.json +30 -0
- package/tslint.json +143 -0
- package/client-server-app.d.ts +0 -1
- package/client-server-app.js +0 -48
- package/client-server-app.js.map +0 -1
- package/collections/app-status.collection.d.ts +0 -3
- package/collections/app-status.collection.js +0 -51
- package/collections/app-status.collection.js.map +0 -1
- package/collections/counter.collection.d.ts +0 -3
- package/collections/counter.collection.js +0 -54
- package/collections/counter.collection.js.map +0 -1
- package/collections/cron-job-history.collection.d.ts +0 -3
- package/collections/cron-job-history.collection.js +0 -82
- package/collections/cron-job-history.collection.js.map +0 -1
- package/collections/cron-job.collection.d.ts +0 -3
- package/collections/cron-job.collection.js +0 -85
- package/collections/cron-job.collection.js.map +0 -1
- package/collections/email-history.collection.d.ts +0 -3
- package/collections/email-history.collection.js +0 -66
- package/collections/email-history.collection.js.map +0 -1
- package/collections/email-verified.collection.d.ts +0 -3
- package/collections/email-verified.collection.js +0 -61
- package/collections/email-verified.collection.js.map +0 -1
- package/collections/file.collection.d.ts +0 -3
- package/collections/file.collection.js +0 -73
- package/collections/file.collection.js.map +0 -1
- package/collections/flag.collection.d.ts +0 -3
- package/collections/flag.collection.js +0 -56
- package/collections/flag.collection.js.map +0 -1
- package/collections/log-method-latency.collection.d.ts +0 -3
- package/collections/log-method-latency.collection.js +0 -64
- package/collections/log-method-latency.collection.js.map +0 -1
- package/collections/log-subscription.collection.d.ts +0 -3
- package/collections/log-subscription.collection.js +0 -68
- package/collections/log-subscription.collection.js.map +0 -1
- package/collections/log-ts.collection.d.ts +0 -3
- package/collections/log-ts.collection.js +0 -78
- package/collections/log-ts.collection.js.map +0 -1
- package/collections/log.collection.d.ts +0 -3
- package/collections/log.collection.js +0 -77
- package/collections/log.collection.js.map +0 -1
- package/collections/logged-in-users.collection.d.ts +0 -3
- package/collections/logged-in-users.collection.js +0 -65
- package/collections/logged-in-users.collection.js.map +0 -1
- package/collections/method-response.collection.d.ts +0 -3
- package/collections/method-response.collection.js +0 -66
- package/collections/method-response.collection.js.map +0 -1
- package/collections/monitor-cpu.collection.d.ts +0 -3
- package/collections/monitor-cpu.collection.js +0 -63
- package/collections/monitor-cpu.collection.js.map +0 -1
- package/collections/monitor-memory.collection.d.ts +0 -3
- package/collections/monitor-memory.collection.js +0 -75
- package/collections/monitor-memory.collection.js.map +0 -1
- package/collections/monitor-mongo.collection.d.ts +0 -3
- package/collections/monitor-mongo.collection.js +0 -69
- package/collections/monitor-mongo.collection.js.map +0 -1
- package/collections/notification.collection.d.ts +0 -3
- package/collections/notification.collection.js +0 -51
- package/collections/notification.collection.js.map +0 -1
- package/collections/report-builder-dashboard-builder.collection.d.ts +0 -3
- package/collections/report-builder-dashboard-builder.collection.js +0 -109
- package/collections/report-builder-dashboard-builder.collection.js.map +0 -1
- package/collections/report-builder-library.collection.d.ts +0 -3
- package/collections/report-builder-library.collection.js +0 -87
- package/collections/report-builder-library.collection.js.map +0 -1
- package/collections/report-builder-report.collection.d.ts +0 -4
- package/collections/report-builder-report.collection.js +0 -149
- package/collections/report-builder-report.collection.js.map +0 -1
- package/collections/user-group.collection.d.ts +0 -4
- package/collections/user-group.collection.js +0 -90
- package/collections/user-group.collection.js.map +0 -1
- package/collections/user-guide.collection.d.ts +0 -3
- package/collections/user-guide.collection.js +0 -57
- package/collections/user-guide.collection.js.map +0 -1
- package/collections/user.collection.d.ts +0 -4
- package/collections/user.collection.js +0 -259
- package/collections/user.collection.js.map +0 -1
- package/cron/cron.d.ts +0 -5
- package/cron/cron.js +0 -162
- package/cron/cron.js.map +0 -1
- package/fixtures/cron-jobs.d.ts +0 -1
- package/fixtures/cron-jobs.js +0 -73
- package/fixtures/cron-jobs.js.map +0 -1
- package/fixtures/init.d.ts +0 -1
- package/fixtures/init.js +0 -59
- package/fixtures/init.js.map +0 -1
- package/http/auth.d.ts +0 -2
- package/http/auth.js +0 -763
- package/http/auth.js.map +0 -1
- package/http/health.d.ts +0 -1
- package/http/health.js +0 -12
- package/http/health.js.map +0 -1
- package/http/home.d.ts +0 -2
- package/http/home.js +0 -66
- package/http/home.js.map +0 -1
- package/index.d.ts +0 -23
- package/index.js +0 -127
- package/index.js.map +0 -1
- package/managers/cron.manager.d.ts +0 -17
- package/managers/cron.manager.js +0 -242
- package/managers/cron.manager.js.map +0 -1
- package/managers/method.manager.d.ts +0 -38
- package/managers/method.manager.js +0 -595
- package/managers/method.manager.js.map +0 -1
- package/managers/mongo.manager.d.ts +0 -178
- package/managers/mongo.manager.js +0 -2221
- package/managers/mongo.manager.js.map +0 -1
- package/managers/monitor.manager.d.ts +0 -59
- package/managers/monitor.manager.js +0 -351
- package/managers/monitor.manager.js.map +0 -1
- package/managers/subscription.manager.d.ts +0 -50
- package/managers/subscription.manager.js +0 -1091
- package/managers/subscription.manager.js.map +0 -1
- package/managers/subscription.performance.d.ts +0 -1
- package/managers/subscription.performance.js.map +0 -1
- package/methods/accounts.d.ts +0 -2
- package/methods/accounts.js +0 -274
- package/methods/accounts.js.map +0 -1
- package/methods/aws.d.ts +0 -2
- package/methods/aws.js +0 -617
- package/methods/aws.js.map +0 -1
- package/methods/collections.d.ts +0 -2
- package/methods/collections.js +0 -499
- package/methods/collections.js.map +0 -1
- package/methods/counters.d.ts +0 -2
- package/methods/counters.js +0 -122
- package/methods/counters.js.map +0 -1
- package/methods/cron-jobs.d.ts +0 -2
- package/methods/cron-jobs.js +0 -1315
- package/methods/cron-jobs.js.map +0 -1
- package/methods/flags.d.ts +0 -2
- package/methods/flags.js +0 -9
- package/methods/flags.js.map +0 -1
- package/methods/logs.d.ts +0 -2
- package/methods/logs.js +0 -371
- package/methods/logs.js.map +0 -1
- package/methods/monitor.d.ts +0 -2
- package/methods/monitor.js +0 -565
- package/methods/monitor.js.map +0 -1
- package/methods/pdf.d.ts +0 -2
- package/methods/pdf.js +0 -324
- package/methods/pdf.js.map +0 -1
- package/methods/report-builder.d.ts +0 -2
- package/methods/report-builder.js +0 -858
- package/methods/report-builder.js.map +0 -1
- package/methods/support.d.ts +0 -2
- package/methods/support.js +0 -246
- package/methods/support.js.map +0 -1
- package/models/app-status.model.js +0 -4
- package/models/app-status.model.js.map +0 -1
- package/models/billing-logged-in-users.model.js +0 -4
- package/models/billing-logged-in-users.model.js.map +0 -1
- package/models/collection-document.model.d.ts +0 -19
- package/models/collection-document.model.js +0 -4
- package/models/collection-document.model.js.map +0 -1
- package/models/counter.model.js +0 -4
- package/models/counter.model.js.map +0 -1
- package/models/cron-job-history.model.d.ts +0 -12
- package/models/cron-job-history.model.js +0 -4
- package/models/cron-job-history.model.js.map +0 -1
- package/models/cron-job.model.d.ts +0 -13
- package/models/cron-job.model.js +0 -4
- package/models/cron-job.model.js.map +0 -1
- package/models/dialog.model.d.ts +0 -23
- package/models/dialog.model.js +0 -4
- package/models/dialog.model.js.map +0 -1
- package/models/email-history.model.js +0 -4
- package/models/email-history.model.js.map +0 -1
- package/models/email-verified.model.js +0 -4
- package/models/email-verified.model.js.map +0 -1
- package/models/file.model.js +0 -4
- package/models/file.model.js.map +0 -1
- package/models/flag.model.js +0 -4
- package/models/flag.model.js.map +0 -1
- package/models/log-method-latency.model.js +0 -4
- package/models/log-method-latency.model.js.map +0 -1
- package/models/log-subscription.model.js +0 -4
- package/models/log-subscription.model.js.map +0 -1
- package/models/log.model.js +0 -4
- package/models/log.model.js.map +0 -1
- package/models/logged-in-users.model.js +0 -4
- package/models/logged-in-users.model.js.map +0 -1
- package/models/method-response.model.js +0 -4
- package/models/method-response.model.js.map +0 -1
- package/models/method.model.d.ts +0 -9
- package/models/method.model.js +0 -4
- package/models/method.model.js.map +0 -1
- package/models/monitor-cpu.model.js +0 -4
- package/models/monitor-cpu.model.js.map +0 -1
- package/models/monitor-memory.model.d.ts +0 -15
- package/models/monitor-memory.model.js +0 -4
- package/models/monitor-memory.model.js.map +0 -1
- package/models/monitor-mongo.model.d.ts +0 -13
- package/models/monitor-mongo.model.js +0 -4
- package/models/monitor-mongo.model.js.map +0 -1
- package/models/notification.model.js +0 -4
- package/models/notification.model.js.map +0 -1
- package/models/pagination.model.d.ts +0 -10
- package/models/pagination.model.js +0 -24
- package/models/pagination.model.js.map +0 -1
- package/models/permission.model.d.ts +0 -12
- package/models/permission.model.js +0 -4
- package/models/permission.model.js.map +0 -1
- package/models/report-builder-dashboard-builder.model.d.ts +0 -25
- package/models/report-builder-dashboard-builder.model.js +0 -4
- package/models/report-builder-dashboard-builder.model.js.map +0 -1
- package/models/report-builder-library.model.d.ts +0 -17
- package/models/report-builder-library.model.js +0 -4
- package/models/report-builder-library.model.js.map +0 -1
- package/models/report-builder-report.model.d.ts +0 -98
- package/models/report-builder-report.model.js +0 -4
- package/models/report-builder-report.model.js.map +0 -1
- package/models/report-builder.model.d.ts +0 -61
- package/models/report-builder.model.js +0 -4
- package/models/report-builder.model.js.map +0 -1
- package/models/select-data-label.model.d.ts +0 -9
- package/models/select-data-label.model.js +0 -4
- package/models/select-data-label.model.js.map +0 -1
- package/models/server-response.model.d.ts +0 -5
- package/models/server-response.model.js +0 -4
- package/models/server-response.model.js.map +0 -1
- package/models/subscription.model.d.ts +0 -23
- package/models/subscription.model.js +0 -4
- package/models/subscription.model.js.map +0 -1
- package/models/support-ticket.model.d.ts +0 -72
- package/models/support-ticket.model.js +0 -4
- package/models/support-ticket.model.js.map +0 -1
- package/models/user-group.model.d.ts +0 -19
- package/models/user-group.model.js +0 -4
- package/models/user-group.model.js.map +0 -1
- package/models/user-guide.model.js +0 -4
- package/models/user-guide.model.js.map +0 -1
- package/models/user.model.d.ts +0 -70
- package/models/user.model.js +0 -4
- package/models/user.model.js.map +0 -1
- package/public_api.js +0 -75
- package/public_api.js.map +0 -1
- package/publications/app-status.d.ts +0 -2
- package/publications/app-status.js +0 -17
- package/publications/app-status.js.map +0 -1
- package/publications/cron-jobs.d.ts +0 -2
- package/publications/cron-jobs.js +0 -33
- package/publications/cron-jobs.js.map +0 -1
- package/publications/files.d.ts +0 -2
- package/publications/files.js +0 -37
- package/publications/files.js.map +0 -1
- package/publications/flags.d.ts +0 -2
- package/publications/flags.js +0 -23
- package/publications/flags.js.map +0 -1
- package/publications/logs.d.ts +0 -2
- package/publications/logs.js +0 -165
- package/publications/logs.js.map +0 -1
- package/publications/method-responses.d.ts +0 -2
- package/publications/method-responses.js +0 -17
- package/publications/method-responses.js.map +0 -1
- package/publications/notifications.d.ts +0 -2
- package/publications/notifications.js +0 -17
- package/publications/notifications.js.map +0 -1
- package/publications/report-builder-dashboard-builders.d.ts +0 -2
- package/publications/report-builder-dashboard-builders.js +0 -43
- package/publications/report-builder-dashboard-builders.js.map +0 -1
- package/publications/report-builder-libraries.d.ts +0 -2
- package/publications/report-builder-libraries.js +0 -90
- package/publications/report-builder-libraries.js.map +0 -1
- package/publications/report-builder-reports.d.ts +0 -2
- package/publications/report-builder-reports.js +0 -51
- package/publications/report-builder-reports.js.map +0 -1
- package/publications/super-admin.d.ts +0 -2
- package/publications/super-admin.js +0 -17
- package/publications/super-admin.js.map +0 -1
- package/publications/user-groups.d.ts +0 -1
- package/publications/user-groups.js +0 -17
- package/publications/user-groups.js.map +0 -1
- package/publications/user-guides.d.ts +0 -1
- package/publications/user-guides.js +0 -17
- package/publications/user-guides.js.map +0 -1
- package/server-app.d.ts +0 -52
- package/server-app.js +0 -739
- package/server-app.js.map +0 -1
- package/util/common.d.ts +0 -25
- package/util/common.js +0 -524
- package/util/common.js.map +0 -1
- package/util/schema-report-builder.d.ts +0 -6
- package/util/schema-report-builder.js +0 -453
- package/util/schema-report-builder.js.map +0 -1
- /package/{private → src/private}/email-templates/enrollment.html +0 -0
- /package/{private → src/private}/email-templates/forgot-password.html +0 -0
- /package/{private → src/private}/email-templates/support-ticket-deleted.html +0 -0
- /package/{private → src/private}/email-templates/support-ticket-modified.html +0 -0
- /package/{private → src/private}/email-templates/support-ticket.html +0 -0
- /package/{private → src/private}/images/ResolveIO.png +0 -0
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { CollectionDocument } from './collection-document.model';
|
|
2
|
-
export interface SupportTicketModel extends CollectionDocument {
|
|
3
|
-
type: SupportTicketType;
|
|
4
|
-
priority: SupportTicketPriority;
|
|
5
|
-
issue: string;
|
|
6
|
-
support_ticket_number: number;
|
|
7
|
-
support_ticket_number_string: string;
|
|
8
|
-
status: SupportTicketStatus;
|
|
9
|
-
substatus: SupportTicketSubstatus;
|
|
10
|
-
client: string;
|
|
11
|
-
id_client: string;
|
|
12
|
-
messages: SupportTicketMessageModel[];
|
|
13
|
-
date_created: Date;
|
|
14
|
-
date_created_string: string;
|
|
15
|
-
id_user_created: string;
|
|
16
|
-
user_created: string;
|
|
17
|
-
billable: boolean;
|
|
18
|
-
date_investigation?: Date;
|
|
19
|
-
date_closed?: Date;
|
|
20
|
-
files: string[];
|
|
21
|
-
current_watchers: SupportTicketWatchersModel[];
|
|
22
|
-
client_user: SupportTicketClientUserModel;
|
|
23
|
-
users_assigned: SupportTicketUserAssignedModel[];
|
|
24
|
-
estimated_billable_hours?: number;
|
|
25
|
-
billable_hours?: number;
|
|
26
|
-
bill_description: string;
|
|
27
|
-
tasks: SupportTicketTaskModel[];
|
|
28
|
-
notes: SupportTicketNoteModel[];
|
|
29
|
-
difficulty: number;
|
|
30
|
-
}
|
|
31
|
-
export interface SupportTicketClientUserModel {
|
|
32
|
-
id_user: string;
|
|
33
|
-
user: string;
|
|
34
|
-
email: string;
|
|
35
|
-
}
|
|
36
|
-
export type SupportTicketPriority = 'High' | 'Low';
|
|
37
|
-
export type SupportTicketSubstatus = 'New' | 'Work In Progress' | 'Idle' | 'Awaiting Customer Interaction';
|
|
38
|
-
export type SupportTicketType = 'System Impairment' | 'Request New Feature' | 'General Inquery';
|
|
39
|
-
type SupportTicketStatus = 'Opened' | 'Resolved';
|
|
40
|
-
export interface SupportTicketMessageModel {
|
|
41
|
-
message: string;
|
|
42
|
-
id_user: string;
|
|
43
|
-
user: string;
|
|
44
|
-
date: Date;
|
|
45
|
-
type: SupportTicketMessageType;
|
|
46
|
-
}
|
|
47
|
-
type SupportTicketMessageType = 'ResolveIO' | 'Client';
|
|
48
|
-
export interface SupportTicketWatchersModel {
|
|
49
|
-
user: string;
|
|
50
|
-
id_user: string;
|
|
51
|
-
email: string;
|
|
52
|
-
}
|
|
53
|
-
export interface SupportTicketTaskModel {
|
|
54
|
-
description: string;
|
|
55
|
-
completed: boolean;
|
|
56
|
-
id_user?: string;
|
|
57
|
-
user?: string;
|
|
58
|
-
date_created: Date;
|
|
59
|
-
date_completed?: Date;
|
|
60
|
-
}
|
|
61
|
-
export interface SupportTicketNoteModel {
|
|
62
|
-
description: string;
|
|
63
|
-
id_user: string;
|
|
64
|
-
user: string;
|
|
65
|
-
date_created: Date;
|
|
66
|
-
}
|
|
67
|
-
export interface SupportTicketUserAssignedModel {
|
|
68
|
-
id_user: string;
|
|
69
|
-
user: string;
|
|
70
|
-
date_created: Date;
|
|
71
|
-
}
|
|
72
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/models/support-ticket.model.ts"],"names":[],"mappings":"","file":"support-ticket.model.js","sourcesContent":["import { CollectionDocument } from './collection-document.model';\n\nexport interface SupportTicketModel extends CollectionDocument {\n\ttype: SupportTicketType;\n\tpriority: SupportTicketPriority;\n\tissue: string;\n\tsupport_ticket_number: number;\n\tsupport_ticket_number_string: string;\n\tstatus: SupportTicketStatus;\n\tsubstatus: SupportTicketSubstatus;\n\tclient: string;\n\tid_client: string;\n\tmessages: SupportTicketMessageModel[];\n\tdate_created: Date;\n\tdate_created_string: string;\n\tid_user_created: string;\n\tuser_created: string;\n\tbillable: boolean;\n\tdate_investigation?: Date;\n\tdate_closed?: Date;\n\tfiles: string[];\n\tcurrent_watchers: SupportTicketWatchersModel[];\n\tclient_user: SupportTicketClientUserModel;\n\tusers_assigned: SupportTicketUserAssignedModel[];\n\testimated_billable_hours?: number;\n\tbillable_hours?: number;\n\tbill_description: string;\n\ttasks: SupportTicketTaskModel[];\n\tnotes: SupportTicketNoteModel[];\n\tdifficulty: number;\n}\n\nexport interface SupportTicketClientUserModel {\n\tid_user: string;\n\tuser: string;\n\temail: string;\n}\n\nexport type SupportTicketPriority = 'High' | 'Low';\n\nexport type SupportTicketSubstatus = 'New' | 'Work In Progress' | 'Idle' | 'Awaiting Customer Interaction';\nexport type SupportTicketType = 'System Impairment' | 'Request New Feature' | 'General Inquery';\ntype SupportTicketStatus = 'Opened' | 'Resolved';\n\nexport interface SupportTicketMessageModel {\n\tmessage: string;\n\tid_user: string;\n\tuser: string;\n\tdate: Date;\n\ttype: SupportTicketMessageType;\n}\n\ntype SupportTicketMessageType = 'ResolveIO' | 'Client';\n\nexport interface SupportTicketWatchersModel {\n\tuser: string;\n\tid_user: string;\n\temail: string;\n}\n\nexport interface SupportTicketTaskModel {\n\tdescription: string;\n\tcompleted: boolean;\n\tid_user?: string;\n\tuser?: string;\n\tdate_created: Date;\n\tdate_completed?: Date;\n}\n\nexport interface SupportTicketNoteModel {\n\tdescription: string;\n\tid_user: string;\n\tuser: string;\n\tdate_created: Date;\n}\n\nexport interface SupportTicketUserAssignedModel {\n\tid_user: string;\n\tuser: string;\n\tdate_created: Date;\n} "]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CollectionDocument } from './collection-document.model';
|
|
2
|
-
export interface UserGroupModel extends CollectionDocument {
|
|
3
|
-
name: string;
|
|
4
|
-
permissions: UserGroupPermissionModel[];
|
|
5
|
-
notifications: UserGroupNotificationModel[];
|
|
6
|
-
}
|
|
7
|
-
export interface UserGroupNotificationModel {
|
|
8
|
-
name: string;
|
|
9
|
-
selected: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface UserGroupPermissionModel {
|
|
12
|
-
name: string;
|
|
13
|
-
selected: boolean;
|
|
14
|
-
views: UserGroupViewModel[];
|
|
15
|
-
}
|
|
16
|
-
export interface UserGroupViewModel {
|
|
17
|
-
link: string;
|
|
18
|
-
selected: boolean;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/models/user-group.model.ts"],"names":[],"mappings":"","file":"user-group.model.js","sourcesContent":["import { CollectionDocument } from './collection-document.model';\n\nexport interface UserGroupModel extends CollectionDocument {\n\tname: string;\n\tpermissions: UserGroupPermissionModel[];\n\tnotifications: UserGroupNotificationModel[];\n}\n\nexport interface UserGroupNotificationModel {\n\tname: string;\n\tselected: boolean;\n}\n\nexport interface UserGroupPermissionModel {\n\tname: string;\n\tselected: boolean;\n\tviews: UserGroupViewModel[];\n}\n\nexport interface UserGroupViewModel {\n\tlink: string;\n\tselected: boolean;\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/models/user-guide.model.ts"],"names":[],"mappings":"","file":"user-guide.model.js","sourcesContent":["import { CollectionDocument } from './collection-document.model';\n\nexport interface UserGuideModel extends CollectionDocument {\n\tlink: string;\n\tlabel: string;\n\tmessage: string;\n}"]}
|
package/models/user.model.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { CollectionDocument } from './collection-document.model';
|
|
2
|
-
export interface UserModel extends CollectionDocument {
|
|
3
|
-
roles: UserRoleModel;
|
|
4
|
-
username: string;
|
|
5
|
-
email: string;
|
|
6
|
-
fullname: string;
|
|
7
|
-
active: boolean;
|
|
8
|
-
phonenumber: string;
|
|
9
|
-
readonly: boolean;
|
|
10
|
-
other: OtherObject;
|
|
11
|
-
attempts: number;
|
|
12
|
-
salt: string;
|
|
13
|
-
hash: string;
|
|
14
|
-
last?: Date;
|
|
15
|
-
settings?: UserSettingsModel;
|
|
16
|
-
services?: Object;
|
|
17
|
-
}
|
|
18
|
-
export interface UserSettingsModel {
|
|
19
|
-
table_color: string;
|
|
20
|
-
table_font_color: string;
|
|
21
|
-
secondary_table_color: string;
|
|
22
|
-
secondary_table_font_color: string;
|
|
23
|
-
tertiary_table_color: string;
|
|
24
|
-
tertiary_table_font_color: string;
|
|
25
|
-
font_size: number;
|
|
26
|
-
collapsable_menu: boolean;
|
|
27
|
-
entries_per_page: string;
|
|
28
|
-
warning_color: string;
|
|
29
|
-
warning_font_color: string;
|
|
30
|
-
warning_hover_color: string;
|
|
31
|
-
success_color: string;
|
|
32
|
-
success_font_color: string;
|
|
33
|
-
success_hover_color: string;
|
|
34
|
-
danger_color: string;
|
|
35
|
-
danger_font_color: string;
|
|
36
|
-
danger_hover_color: string;
|
|
37
|
-
info_color: string;
|
|
38
|
-
info_font_color: string;
|
|
39
|
-
info_hover_color: string;
|
|
40
|
-
primary_color: string;
|
|
41
|
-
primary_font_color: string;
|
|
42
|
-
primary_hover_color: string;
|
|
43
|
-
secondary_color: string;
|
|
44
|
-
secondary_font_color: string;
|
|
45
|
-
secondary_hover_color: string;
|
|
46
|
-
routing_preference: string;
|
|
47
|
-
opening_route: string;
|
|
48
|
-
}
|
|
49
|
-
export interface UserRoleModel {
|
|
50
|
-
super_admin: boolean;
|
|
51
|
-
approvals: UserRoleApprovalModel[];
|
|
52
|
-
groups: UserRoleGroupModel[];
|
|
53
|
-
notifications: string[];
|
|
54
|
-
miscs: string[];
|
|
55
|
-
}
|
|
56
|
-
export interface UserRoleApprovalModel {
|
|
57
|
-
type: string;
|
|
58
|
-
key_1?: string;
|
|
59
|
-
key_2?: string;
|
|
60
|
-
key_3?: string;
|
|
61
|
-
name: string;
|
|
62
|
-
}
|
|
63
|
-
export interface UserRoleGroupModel {
|
|
64
|
-
name: string;
|
|
65
|
-
views: string[];
|
|
66
|
-
yard?: string;
|
|
67
|
-
}
|
|
68
|
-
export interface OtherObject {
|
|
69
|
-
[key: string]: any;
|
|
70
|
-
}
|
package/models/user.model.js
DELETED
package/models/user.model.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/models/user.model.ts"],"names":[],"mappings":"","file":"user.model.js","sourcesContent":["import { CollectionDocument } from './collection-document.model';\n\nexport interface UserModel extends CollectionDocument {\n\troles: UserRoleModel;\n\tusername: string;\n\temail: string;\n\tfullname: string;\n\tactive: boolean;\n\tphonenumber: string;\n\treadonly: boolean;\n\tother: OtherObject;\n\n\t//security\n\tattempts: number;\n\tsalt: string;\n\thash: string;\n\n\tlast?: Date;\n\tsettings?: UserSettingsModel;\n\tservices?: Object;\n}\n\nexport interface UserSettingsModel {\n\ttable_color: string;\n\ttable_font_color: string;\n\tsecondary_table_color: string;\n\tsecondary_table_font_color: string;\n\ttertiary_table_color: string;\n\ttertiary_table_font_color: string;\n\tfont_size: number;\n\tcollapsable_menu: boolean;\n\tentries_per_page: string\n\twarning_color: string;\n\twarning_font_color: string;\n\twarning_hover_color: string;\n\tsuccess_color: string;\n\tsuccess_font_color: string;\n\tsuccess_hover_color: string;\n\tdanger_color: string;\n\tdanger_font_color: string;\n\tdanger_hover_color: string;\n\tinfo_color: string;\n\tinfo_font_color: string;\n\tinfo_hover_color: string;\n\tprimary_color: string;\n\tprimary_font_color: string;\n\tprimary_hover_color: string;\n\tsecondary_color: string;\n\tsecondary_font_color: string;\n\tsecondary_hover_color: string;\n\trouting_preference: string;\n\topening_route: string;\n}\n\nexport interface UserRoleModel {\n\tsuper_admin: boolean;\n\tapprovals: UserRoleApprovalModel[];\n\tgroups: UserRoleGroupModel[];\n\tnotifications: string[];\n\tmiscs: string[];\n}\n\nexport interface UserRoleApprovalModel {\n\ttype: string; // po or afe or chemical\n\tkey_1?: string; // department or accounting code\n\tkey_2?: string; // order type\n\tkey_3?: string; // other/additional\n\tname: string; // approval name\n}\n\nexport interface UserRoleGroupModel {\n\tname: string;\n\tviews: string[];\n\tyard?: string;\n}\n\nexport interface OtherObject {\n [key: string]: any;\n}"]}
|
package/public_api.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./collections/app-status.collection"), exports);
|
|
18
|
-
__exportStar(require("./collections/counter.collection"), exports);
|
|
19
|
-
__exportStar(require("./collections/cron-job-history.collection"), exports);
|
|
20
|
-
__exportStar(require("./collections/cron-job.collection"), exports);
|
|
21
|
-
__exportStar(require("./collections/email-history.collection"), exports);
|
|
22
|
-
__exportStar(require("./collections/email-verified.collection"), exports);
|
|
23
|
-
__exportStar(require("./collections/file.collection"), exports);
|
|
24
|
-
__exportStar(require("./collections/flag.collection"), exports);
|
|
25
|
-
__exportStar(require("./collections/log-method-latency.collection"), exports);
|
|
26
|
-
__exportStar(require("./collections/log-subscription.collection"), exports);
|
|
27
|
-
__exportStar(require("./collections/log.collection"), exports);
|
|
28
|
-
__exportStar(require("./collections/logged-in-users.collection"), exports);
|
|
29
|
-
__exportStar(require("./collections/method-response.collection"), exports);
|
|
30
|
-
__exportStar(require("./collections/monitor-cpu.collection"), exports);
|
|
31
|
-
__exportStar(require("./collections/monitor-memory.collection"), exports);
|
|
32
|
-
__exportStar(require("./collections/monitor-mongo.collection"), exports);
|
|
33
|
-
__exportStar(require("./collections/notification.collection"), exports);
|
|
34
|
-
__exportStar(require("./collections/report-builder-library.collection"), exports);
|
|
35
|
-
__exportStar(require("./collections/report-builder-report.collection"), exports);
|
|
36
|
-
__exportStar(require("./collections/user-group.collection"), exports);
|
|
37
|
-
__exportStar(require("./collections/user-guide.collection"), exports);
|
|
38
|
-
__exportStar(require("./collections/user.collection"), exports);
|
|
39
|
-
__exportStar(require("./models/app-status.model"), exports);
|
|
40
|
-
__exportStar(require("./models/billing-logged-in-users.model"), exports);
|
|
41
|
-
__exportStar(require("./models/collection-document.model"), exports);
|
|
42
|
-
__exportStar(require("./models/counter.model"), exports);
|
|
43
|
-
__exportStar(require("./models/cron-job-history.model"), exports);
|
|
44
|
-
__exportStar(require("./models/cron-job.model"), exports);
|
|
45
|
-
__exportStar(require("./models/dialog.model"), exports);
|
|
46
|
-
__exportStar(require("./models/email-history.model"), exports);
|
|
47
|
-
__exportStar(require("./models/email-verified.model"), exports);
|
|
48
|
-
__exportStar(require("./models/file.model"), exports);
|
|
49
|
-
__exportStar(require("./models/flag.model"), exports);
|
|
50
|
-
__exportStar(require("./models/log-method-latency.model"), exports);
|
|
51
|
-
__exportStar(require("./models/log-subscription.model"), exports);
|
|
52
|
-
__exportStar(require("./models/log.model"), exports);
|
|
53
|
-
__exportStar(require("./models/logged-in-users.model"), exports);
|
|
54
|
-
__exportStar(require("./models/method-response.model"), exports);
|
|
55
|
-
__exportStar(require("./models/method.model"), exports);
|
|
56
|
-
__exportStar(require("./models/monitor-cpu.model"), exports);
|
|
57
|
-
__exportStar(require("./models/monitor-memory.model"), exports);
|
|
58
|
-
__exportStar(require("./models/monitor-mongo.model"), exports);
|
|
59
|
-
__exportStar(require("./models/notification.model"), exports);
|
|
60
|
-
__exportStar(require("./models/pagination.model"), exports);
|
|
61
|
-
__exportStar(require("./models/permission.model"), exports);
|
|
62
|
-
__exportStar(require("./models/report-builder-library.model"), exports);
|
|
63
|
-
__exportStar(require("./models/report-builder-report.model"), exports);
|
|
64
|
-
__exportStar(require("./models/report-builder.model"), exports);
|
|
65
|
-
__exportStar(require("./models/select-data-label.model"), exports);
|
|
66
|
-
__exportStar(require("./models/server-response.model"), exports);
|
|
67
|
-
__exportStar(require("./models/subscription.model"), exports);
|
|
68
|
-
__exportStar(require("./models/support-ticket.model"), exports);
|
|
69
|
-
__exportStar(require("./models/user-group.model"), exports);
|
|
70
|
-
__exportStar(require("./models/user-guide.model"), exports);
|
|
71
|
-
__exportStar(require("./models/user.model"), exports);
|
|
72
|
-
__exportStar(require("./util/common"), exports);
|
|
73
|
-
__exportStar(require("./managers/mongo.manager"), exports);
|
|
74
|
-
|
|
75
|
-
//# sourceMappingURL=public_api.js.map
|
package/public_api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/public_api.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD;AACpD,mEAAiD;AACjD,4EAA0D;AAC1D,oEAAkD;AAClD,yEAAuD;AACvD,0EAAwD;AACxD,gEAA8C;AAC9C,gEAA8C;AAC9C,8EAA4D;AAC5D,4EAA0D;AAC1D,+DAA6C;AAC7C,2EAAyD;AACzD,2EAAyD;AACzD,uEAAqD;AACrD,0EAAwD;AACxD,yEAAuD;AACvD,wEAAsD;AACtD,kFAAgE;AAChE,iFAA+D;AAC/D,sEAAoD;AACpD,sEAAoD;AACpD,gEAA8C;AAC9C,4DAA0C;AAC1C,yEAAuD;AACvD,qEAAmD;AACnD,yDAAuC;AACvC,kEAAgD;AAChD,0DAAwC;AACxC,wDAAsC;AACtC,+DAA6C;AAC7C,gEAA8C;AAC9C,sDAAoC;AACpC,sDAAoC;AACpC,oEAAkD;AAClD,kEAAgD;AAChD,qDAAmC;AACnC,iEAA+C;AAC/C,iEAA+C;AAC/C,wDAAsC;AACtC,6DAA2C;AAC3C,gEAA8C;AAC9C,+DAA6C;AAC7C,8DAA4C;AAC5C,4DAA0C;AAC1C,4DAA0C;AAC1C,wEAAsD;AACtD,uEAAqD;AACrD,gEAA8C;AAC9C,mEAAiD;AACjD,iEAA+C;AAC/C,8DAA4C;AAC5C,gEAA8C;AAC9C,4DAA0C;AAC1C,4DAA0C;AAC1C,sDAAoC;AACpC,gDAA8B;AAC9B,2DAAyC","file":"public_api.js","sourcesContent":["export * from './collections/app-status.collection';\nexport * from './collections/counter.collection';\nexport * from './collections/cron-job-history.collection';\nexport * from './collections/cron-job.collection';\nexport * from './collections/email-history.collection';\nexport * from './collections/email-verified.collection';\nexport * from './collections/file.collection';\nexport * from './collections/flag.collection';\nexport * from './collections/log-method-latency.collection';\nexport * from './collections/log-subscription.collection';\nexport * from './collections/log.collection';\nexport * from './collections/logged-in-users.collection';\nexport * from './collections/method-response.collection';\nexport * from './collections/monitor-cpu.collection';\nexport * from './collections/monitor-memory.collection';\nexport * from './collections/monitor-mongo.collection';\nexport * from './collections/notification.collection';\nexport * from './collections/report-builder-library.collection';\nexport * from './collections/report-builder-report.collection';\nexport * from './collections/user-group.collection';\nexport * from './collections/user-guide.collection';\nexport * from './collections/user.collection';\nexport * from './models/app-status.model';\nexport * from './models/billing-logged-in-users.model';\nexport * from './models/collection-document.model';\nexport * from './models/counter.model';\nexport * from './models/cron-job-history.model';\nexport * from './models/cron-job.model';\nexport * from './models/dialog.model';\nexport * from './models/email-history.model';\nexport * from './models/email-verified.model';\nexport * from './models/file.model';\nexport * from './models/flag.model';\nexport * from './models/log-method-latency.model';\nexport * from './models/log-subscription.model';\nexport * from './models/log.model';\nexport * from './models/logged-in-users.model';\nexport * from './models/method-response.model';\nexport * from './models/method.model';\nexport * from './models/monitor-cpu.model';\nexport * from './models/monitor-memory.model';\nexport * from './models/monitor-mongo.model';\nexport * from './models/notification.model';\nexport * from './models/pagination.model';\nexport * from './models/permission.model';\nexport * from './models/report-builder-library.model';\nexport * from './models/report-builder-report.model';\nexport * from './models/report-builder.model';\nexport * from './models/select-data-label.model';\nexport * from './models/server-response.model';\nexport * from './models/subscription.model';\nexport * from './models/support-ticket.model';\nexport * from './models/user-group.model';\nexport * from './models/user-guide.model';\nexport * from './models/user.model';\nexport * from './util/common';\nexport * from './managers/mongo.manager';"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadAppStatusPublications = void 0;
|
|
4
|
-
var app_status_collection_1 = require("../collections/app-status.collection");
|
|
5
|
-
function loadAppStatusPublications(subscriptionManager) {
|
|
6
|
-
subscriptionManager.publications({
|
|
7
|
-
appstatus: {
|
|
8
|
-
function: function () {
|
|
9
|
-
return app_status_collection_1.AppStatus.findOne();
|
|
10
|
-
},
|
|
11
|
-
collections: ['app-statuses']
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
exports.loadAppStatusPublications = loadAppStatusPublications;
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=app-status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/app-status.ts"],"names":[],"mappings":";;;AACA,8EAAiE;AAEjE,SAAgB,yBAAyB,CAAC,mBAAwC;IACjF,mBAAmB,CAAC,YAAY,CAAC;QAChC,SAAS,EAAE;YACV,QAAQ,EAAE;gBACT,OAAO,iCAAS,CAAC,OAAO,EAAE,CAAC;YAC5B,CAAC;YACD,WAAW,EAAE,CAAC,cAAc,CAAC;SAC7B;KACD,CAAC,CAAC;AACJ,CAAC;AATD,8DASC","file":"app-status.js","sourcesContent":["import { SubscriptionManager } from '../managers/subscription.manager';\nimport { AppStatus } from '../collections/app-status.collection';\n\nexport function loadAppStatusPublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\tappstatus: {\n\t\t\tfunction: () => {\n\t\t\t\treturn AppStatus.findOne();\n\t\t\t},\n\t\t\tcollections: ['app-statuses']\n\t\t}\n\t});\n}"]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadCronJobPublications = void 0;
|
|
4
|
-
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
-
var cron_job_collection_1 = require("../collections/cron-job.collection");
|
|
6
|
-
function loadCronJobPublications(subscriptionManager) {
|
|
7
|
-
subscriptionManager.publications({
|
|
8
|
-
cronjobs: {
|
|
9
|
-
function: function () {
|
|
10
|
-
return cron_job_collection_1.CronJobs.find({}, { sort: { name: 1 } });
|
|
11
|
-
},
|
|
12
|
-
collections: ['cron-jobs']
|
|
13
|
-
},
|
|
14
|
-
cronjobsReportBuilderWithIdUser: {
|
|
15
|
-
function: function (id_user) {
|
|
16
|
-
return cron_job_collection_1.CronJobs.find({ $and: [
|
|
17
|
-
{ method_run_data: { $exists: 1 } },
|
|
18
|
-
{ 'method_run_data.id_user': id_user },
|
|
19
|
-
{ 'method_run_data.type': 'Report Builder Scheduled Job' }
|
|
20
|
-
] });
|
|
21
|
-
},
|
|
22
|
-
check: new simpl_schema_1.default({
|
|
23
|
-
id_user: {
|
|
24
|
-
type: String
|
|
25
|
-
}
|
|
26
|
-
}),
|
|
27
|
-
collections: ['cron-jobs']
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
exports.loadCronJobPublications = loadCronJobPublications;
|
|
32
|
-
|
|
33
|
-
//# sourceMappingURL=cron-jobs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/cron-jobs.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AAExC,0EAA8D;AAG9D,SAAgB,uBAAuB,CAAC,mBAAwC;IAC/E,mBAAmB,CAAC,YAAY,CAAC;QAChC,QAAQ,EAAE;YACT,QAAQ,EAAE;gBACT,OAAO,8BAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,EAAC,IAAI,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,EAAC,CAAC,CAAC;YAC7C,CAAC;YACD,WAAW,EAAE,CAAC,WAAW,CAAC;SAC1B;QACD,+BAA+B,EAAE;YAChC,QAAQ,EAAE,UAAC,OAAe;gBACzB,OAAO,8BAAQ,CAAC,IAAI,CAAC,EAAC,IAAI,EAAE;wBAC3B,EAAC,eAAe,EAAE,EAAC,OAAO,EAAE,CAAC,EAAC,EAAC;wBAC/B,EAAC,yBAAyB,EAAE,OAAO,EAAC;wBACpC,EAAC,sBAAsB,EAAE,8BAA8B,EAAC;qBACxD,EAAC,CAAC,CAAC;YACL,CAAC;YACD,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,OAAO,EAAE;oBACR,IAAI,EAAE,MAAM;iBACZ;aACD,CAAC;YACF,WAAW,EAAE,CAAC,WAAW,CAAC;SAC1B;KACD,CAAC,CAAC;AACJ,CAAC;AAxBD,0DAwBC","file":"cron-jobs.js","sourcesContent":["import SimpleSchema from 'simpl-schema';\nimport { SubscriptionManager } from '../managers/subscription.manager';\nimport { CronJobs } from '../collections/cron-job.collection';\nimport { CollectionDocument } from '../models/collection-document.model';\n\nexport function loadCronJobPublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\tcronjobs: {\n\t\t\tfunction: () => {\n\t\t\t\treturn CronJobs.find({}, {sort: {name: 1}});\n\t\t\t},\n\t\t\tcollections: ['cron-jobs']\n\t\t},\n\t\tcronjobsReportBuilderWithIdUser: {\n\t\t\tfunction: (id_user: string) => {\n\t\t\t\treturn CronJobs.find({$and: [\n\t\t\t\t\t{method_run_data: {$exists: 1}},\n\t\t\t\t\t{'method_run_data.id_user': id_user},\n\t\t\t\t\t{'method_run_data.type': 'Report Builder Scheduled Job'}\n\t\t\t\t]});\n\t\t\t},\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\tcollections: ['cron-jobs']\n\t\t}\n\t});\n}"]}
|
package/publications/files.d.ts
DELETED
package/publications/files.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadFilePublications = void 0;
|
|
4
|
-
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
-
var file_collection_1 = require("../collections/file.collection");
|
|
6
|
-
function loadFilePublications(subscriptionManager) {
|
|
7
|
-
subscriptionManager.publications({
|
|
8
|
-
fileWithId: {
|
|
9
|
-
function: function (id_file) {
|
|
10
|
-
return file_collection_1.Files.findById(id_file);
|
|
11
|
-
},
|
|
12
|
-
check: new simpl_schema_1.default({
|
|
13
|
-
id_file: {
|
|
14
|
-
type: String
|
|
15
|
-
}
|
|
16
|
-
}),
|
|
17
|
-
collections: ['files']
|
|
18
|
-
},
|
|
19
|
-
filesIn: {
|
|
20
|
-
function: function (id_files) {
|
|
21
|
-
return file_collection_1.Files.find({ _id: { $in: id_files } }, { sort: { name: 1 } });
|
|
22
|
-
},
|
|
23
|
-
check: new simpl_schema_1.default({
|
|
24
|
-
id_files: {
|
|
25
|
-
type: Array
|
|
26
|
-
},
|
|
27
|
-
'id_files.$': {
|
|
28
|
-
type: String
|
|
29
|
-
}
|
|
30
|
-
}),
|
|
31
|
-
collections: ['files']
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
exports.loadFilePublications = loadFilePublications;
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=files.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/files.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AACxC,kEAAuD;AAIvD,SAAgB,oBAAoB,CAAC,mBAAwC;IAC5E,mBAAmB,CAAC,YAAY,CAAC;QAChC,UAAU,EAAE;YACX,QAAQ,EAAE,UAAC,OAAe;gBACzB,OAAO,uBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAChC,CAAC;YACD,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,OAAO,EAAE;oBACR,IAAI,EAAE,MAAM;iBACZ;aACD,CAAC;YACF,WAAW,EAAE,CAAC,OAAO,CAAC;SACtB;QACD,OAAO,EAAE;YACR,QAAQ,EAAE,UAAC,QAAkB;gBAC5B,OAAO,uBAAK,CAAC,IAAI,CAAC,EAAC,GAAG,EAAE,EAAC,GAAG,EAAE,QAAQ,EAAC,EAAC,EAAE,EAAC,IAAI,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,EAAC,CAAC,CAAC;YAC9D,CAAC;YACD,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,QAAQ,EAAE;oBACT,IAAI,EAAE,KAAK;iBACX;gBACD,YAAY,EAAE;oBACb,IAAI,EAAE,MAAM;iBACZ;aACD,CAAC;YACF,WAAW,EAAE,CAAC,OAAO,CAAC;SACtB;KACD,CAAC,CAAC;AACJ,CAAC;AA5BD,oDA4BC","file":"files.js","sourcesContent":["import SimpleSchema from 'simpl-schema';\nimport { Files } from '../collections/file.collection';\nimport { SubscriptionManager } from '../managers/subscription.manager';\nimport { CollectionDocument } from '../models/collection-document.model';\n\nexport function loadFilePublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\tfileWithId: {\n\t\t\tfunction: (id_file: string) => {\n\t\t\t\treturn Files.findById(id_file);\n\t\t\t},\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_file: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcollections: ['files']\n\t\t},\n\t\tfilesIn: {\n\t\t\tfunction: (id_files: string[]) => {\n\t\t\t\treturn Files.find({_id: {$in: id_files}}, {sort: {name: 1}});\n\t\t\t},\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tid_files: {\n\t\t\t\t\ttype: Array\n\t\t\t\t},\n\t\t\t\t'id_files.$': {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcollections: ['files']\n\t\t}\n\t});\n}"]}
|
package/publications/flags.d.ts
DELETED
package/publications/flags.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadFlagsPublications = void 0;
|
|
4
|
-
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
-
var flag_collection_1 = require("../collections/flag.collection");
|
|
6
|
-
function loadFlagsPublications(subscriptionManager) {
|
|
7
|
-
subscriptionManager.publications({
|
|
8
|
-
flagWithType: {
|
|
9
|
-
function: function (flagType) {
|
|
10
|
-
return flag_collection_1.Flags.findOne({ type: flagType });
|
|
11
|
-
},
|
|
12
|
-
check: new simpl_schema_1.default({
|
|
13
|
-
flagType: {
|
|
14
|
-
type: String
|
|
15
|
-
}
|
|
16
|
-
}),
|
|
17
|
-
collections: ['flags']
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
exports.loadFlagsPublications = loadFlagsPublications;
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=flags.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/flags.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AAExC,kEAAuD;AAGvD,SAAgB,qBAAqB,CAAC,mBAAwC;IAC7E,mBAAmB,CAAC,YAAY,CAAC;QAChC,YAAY,EAAE;YACb,QAAQ,EAAE,UAAC,QAAgB;gBAC1B,OAAO,uBAAK,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC,CAAC;YACxC,CAAC;YACD,KAAK,EAAE,IAAI,sBAAY,CAAC;gBACvB,QAAQ,EAAE;oBACT,IAAI,EAAE,MAAM;iBACZ;aACD,CAAC;YACF,WAAW,EAAE,CAAC,OAAO,CAAC;SACtB;KACD,CAAC,CAAC;AACJ,CAAC;AAdD,sDAcC","file":"flags.js","sourcesContent":["import SimpleSchema from 'simpl-schema';\nimport { SubscriptionManager } from '../managers/subscription.manager';\nimport { Flags } from '../collections/flag.collection';\nimport { CollectionDocument } from '../models/collection-document.model';\n\nexport function loadFlagsPublications(subscriptionManager: SubscriptionManager) {\n\tsubscriptionManager.publications({\n\t\tflagWithType: {\n\t\t\tfunction: (flagType: string) => {\n\t\t\t\treturn Flags.findOne({type: flagType});\n\t\t\t},\n\t\t\tcheck: new SimpleSchema({\n\t\t\t\tflagType: {\n\t\t\t\t\ttype: String\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcollections: ['flags']\n\t\t}\n\t});\n}"]}
|
package/publications/logs.d.ts
DELETED
package/publications/logs.js
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
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) {
|
|
8
|
-
subscriptionManager.publications({
|
|
9
|
-
logsWithType: {
|
|
10
|
-
function: function (type) {
|
|
11
|
-
if (type === 'all') {
|
|
12
|
-
return log_collection_1.Logs.find({}, { sort: { createdAt: -1 } });
|
|
13
|
-
}
|
|
14
|
-
return log_collection_1.Logs.find({ type: type }, { sort: { createdAt: -1 } });
|
|
15
|
-
},
|
|
16
|
-
check: new simpl_schema_1.default({
|
|
17
|
-
type: {
|
|
18
|
-
type: String
|
|
19
|
-
}
|
|
20
|
-
}),
|
|
21
|
-
collections: ['logs']
|
|
22
|
-
},
|
|
23
|
-
logsWithTypes: {
|
|
24
|
-
function: function (types) {
|
|
25
|
-
return log_collection_1.Logs.find({ type: { $in: types } }, { sort: { createdAt: -1 } });
|
|
26
|
-
},
|
|
27
|
-
check: new simpl_schema_1.default({
|
|
28
|
-
types: {
|
|
29
|
-
type: Array
|
|
30
|
-
},
|
|
31
|
-
'types.$': {
|
|
32
|
-
type: String
|
|
33
|
-
}
|
|
34
|
-
}),
|
|
35
|
-
collections: ['logs']
|
|
36
|
-
},
|
|
37
|
-
logsWithIdDocument: {
|
|
38
|
-
function: function (id_document) {
|
|
39
|
-
return log_collection_1.Logs.find({ id_document: id_document }, { sort: { createdAt: -1 } });
|
|
40
|
-
},
|
|
41
|
-
check: new simpl_schema_1.default({
|
|
42
|
-
id_document: {
|
|
43
|
-
type: String
|
|
44
|
-
}
|
|
45
|
-
}),
|
|
46
|
-
collections: ['logs']
|
|
47
|
-
},
|
|
48
|
-
logsWithMethod: {
|
|
49
|
-
function: function (method) {
|
|
50
|
-
return log_collection_1.Logs.find({ method: method }, { sort: { createdAt: -1 } });
|
|
51
|
-
},
|
|
52
|
-
check: new simpl_schema_1.default({
|
|
53
|
-
method: {
|
|
54
|
-
type: String
|
|
55
|
-
}
|
|
56
|
-
}),
|
|
57
|
-
collections: ['logs']
|
|
58
|
-
},
|
|
59
|
-
logsWithRoute: {
|
|
60
|
-
function: function (route) {
|
|
61
|
-
return log_collection_1.Logs.find({ route: route }, { sort: { createdAt: -1 } });
|
|
62
|
-
},
|
|
63
|
-
check: new simpl_schema_1.default({
|
|
64
|
-
route: {
|
|
65
|
-
type: String
|
|
66
|
-
}
|
|
67
|
-
}),
|
|
68
|
-
collections: ['logs']
|
|
69
|
-
},
|
|
70
|
-
logsWithCollection: {
|
|
71
|
-
function: function (collection) {
|
|
72
|
-
return log_collection_1.Logs.find({ collection: collection }, { sort: { createdAt: -1 } });
|
|
73
|
-
},
|
|
74
|
-
check: new simpl_schema_1.default({
|
|
75
|
-
collection: {
|
|
76
|
-
type: String
|
|
77
|
-
}
|
|
78
|
-
}),
|
|
79
|
-
collections: ['logs']
|
|
80
|
-
},
|
|
81
|
-
methodlatencies: {
|
|
82
|
-
function: function () {
|
|
83
|
-
return log_method_latency_collection_1.LogMethodLatencies.find({}, { sort: { date_start: -1 } });
|
|
84
|
-
},
|
|
85
|
-
collections: ['log-method-latencies'],
|
|
86
|
-
},
|
|
87
|
-
// superadminAPM: {
|
|
88
|
-
// check: new SimpleSchema({
|
|
89
|
-
// date_start: {
|
|
90
|
-
// type: Date
|
|
91
|
-
// },
|
|
92
|
-
// date_end: {
|
|
93
|
-
// type: Date
|
|
94
|
-
// }
|
|
95
|
-
// }),
|
|
96
|
-
// function: function(date_start: Date, date_end: Date) {
|
|
97
|
-
// return new Promise(async (resolve, reject) => {
|
|
98
|
-
// let latencies = await LogMethodLatencies.aggregate([
|
|
99
|
-
// {
|
|
100
|
-
// $match: {
|
|
101
|
-
// $and: [
|
|
102
|
-
// {
|
|
103
|
-
// createdAt: {$gte: date_start}
|
|
104
|
-
// },
|
|
105
|
-
// {
|
|
106
|
-
// createdAt: {$lte: date_end}
|
|
107
|
-
// }
|
|
108
|
-
// ]
|
|
109
|
-
// }
|
|
110
|
-
// },
|
|
111
|
-
// {
|
|
112
|
-
// $group: {
|
|
113
|
-
// _id: '$method',
|
|
114
|
-
// method: {$first: '$method'},
|
|
115
|
-
// count: {$sum: 1},
|
|
116
|
-
// latency_min: {$min: '$latency_ms'},
|
|
117
|
-
// latency_avg: {$avg: '$latency_ms'},
|
|
118
|
-
// latency_max: {$max: '$latency_ms'}
|
|
119
|
-
// }
|
|
120
|
-
// },
|
|
121
|
-
// {
|
|
122
|
-
// $sort: {
|
|
123
|
-
// latency_avg: -1
|
|
124
|
-
// }
|
|
125
|
-
// }
|
|
126
|
-
// ]);
|
|
127
|
-
// let subscriptions = await LogSubscriptions.aggregate([
|
|
128
|
-
// {
|
|
129
|
-
// $match: {
|
|
130
|
-
// $and: [
|
|
131
|
-
// {
|
|
132
|
-
// createdAt: {$gte: date_start}
|
|
133
|
-
// },
|
|
134
|
-
// {
|
|
135
|
-
// createdAt: {$lte: date_end}
|
|
136
|
-
// }
|
|
137
|
-
// ]
|
|
138
|
-
// }
|
|
139
|
-
// },
|
|
140
|
-
// {
|
|
141
|
-
// $group: {
|
|
142
|
-
// _id: '$subscription',
|
|
143
|
-
// subscription: {$first: '$subscription'},
|
|
144
|
-
// count: {$sum: 1}
|
|
145
|
-
// }
|
|
146
|
-
// },
|
|
147
|
-
// {
|
|
148
|
-
// $sort: {
|
|
149
|
-
// count: -1
|
|
150
|
-
// }
|
|
151
|
-
// }
|
|
152
|
-
// ]);
|
|
153
|
-
// resolve({
|
|
154
|
-
// methods: latencies,
|
|
155
|
-
// subscriptions: subscriptions
|
|
156
|
-
// });
|
|
157
|
-
// });
|
|
158
|
-
// },
|
|
159
|
-
// collections: ['log-method-latencies', 'log-subscriptions'],
|
|
160
|
-
// }
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
exports.loadLogPublications = loadLogPublications;
|
|
164
|
-
|
|
165
|
-
//# sourceMappingURL=logs.js.map
|
package/publications/logs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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},\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},\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},\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},\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},\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},\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}"]}
|