@resolveio/server-lib 12.5.54 → 12.5.56
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.d.ts +1 -0
- package/client-server-app.js +48 -0
- package/client-server-app.js.map +1 -0
- package/collections/app-status.collection.d.ts +3 -0
- package/collections/app-status.collection.js +51 -0
- package/collections/app-status.collection.js.map +1 -0
- package/collections/counter.collection.d.ts +3 -0
- package/collections/counter.collection.js +54 -0
- package/collections/counter.collection.js.map +1 -0
- package/collections/cron-job-history.collection.d.ts +3 -0
- package/collections/cron-job-history.collection.js +82 -0
- package/collections/cron-job-history.collection.js.map +1 -0
- package/collections/cron-job.collection.d.ts +3 -0
- package/collections/cron-job.collection.js +85 -0
- package/collections/cron-job.collection.js.map +1 -0
- package/collections/email-history.collection.d.ts +3 -0
- package/collections/email-history.collection.js +66 -0
- package/collections/email-history.collection.js.map +1 -0
- package/collections/email-verified.collection.d.ts +3 -0
- package/collections/email-verified.collection.js +61 -0
- package/collections/email-verified.collection.js.map +1 -0
- package/collections/file.collection.d.ts +3 -0
- package/collections/file.collection.js +73 -0
- package/collections/file.collection.js.map +1 -0
- package/collections/flag.collection.d.ts +3 -0
- package/collections/flag.collection.js +56 -0
- package/collections/flag.collection.js.map +1 -0
- package/collections/log-method-latency.collection.d.ts +3 -0
- package/collections/log-method-latency.collection.js +64 -0
- package/collections/log-method-latency.collection.js.map +1 -0
- package/collections/log-subscription.collection.d.ts +3 -0
- package/collections/log-subscription.collection.js +68 -0
- package/collections/log-subscription.collection.js.map +1 -0
- package/collections/log-ts.collection.d.ts +3 -0
- package/collections/log-ts.collection.js +78 -0
- package/collections/log-ts.collection.js.map +1 -0
- package/collections/log.collection.d.ts +3 -0
- package/collections/log.collection.js +77 -0
- package/collections/log.collection.js.map +1 -0
- package/collections/logged-in-users.collection.d.ts +3 -0
- package/collections/logged-in-users.collection.js +65 -0
- package/collections/logged-in-users.collection.js.map +1 -0
- package/collections/method-response.collection.d.ts +3 -0
- package/collections/method-response.collection.js +66 -0
- package/collections/method-response.collection.js.map +1 -0
- package/collections/monitor-cpu.collection.d.ts +3 -0
- package/collections/monitor-cpu.collection.js +63 -0
- package/collections/monitor-cpu.collection.js.map +1 -0
- package/collections/monitor-memory.collection.d.ts +3 -0
- package/collections/monitor-memory.collection.js +75 -0
- package/collections/monitor-memory.collection.js.map +1 -0
- package/collections/monitor-mongo.collection.d.ts +3 -0
- package/collections/monitor-mongo.collection.js +69 -0
- package/collections/monitor-mongo.collection.js.map +1 -0
- package/collections/notification.collection.d.ts +3 -0
- package/collections/notification.collection.js +51 -0
- package/collections/notification.collection.js.map +1 -0
- package/collections/report-builder-dashboard-builder.collection.d.ts +3 -0
- package/collections/report-builder-dashboard-builder.collection.js +109 -0
- package/collections/report-builder-dashboard-builder.collection.js.map +1 -0
- package/collections/report-builder-library.collection.d.ts +3 -0
- package/collections/report-builder-library.collection.js +87 -0
- package/collections/report-builder-library.collection.js.map +1 -0
- package/collections/report-builder-report.collection.d.ts +4 -0
- package/collections/report-builder-report.collection.js +149 -0
- package/collections/report-builder-report.collection.js.map +1 -0
- package/collections/user-group.collection.d.ts +4 -0
- package/collections/user-group.collection.js +90 -0
- package/collections/user-group.collection.js.map +1 -0
- package/collections/user-guide.collection.d.ts +3 -0
- package/collections/user-guide.collection.js +57 -0
- package/collections/user-guide.collection.js.map +1 -0
- package/collections/user.collection.d.ts +4 -0
- package/collections/user.collection.js +259 -0
- package/collections/user.collection.js.map +1 -0
- package/cron/cron.d.ts +5 -0
- package/cron/cron.js +162 -0
- package/cron/cron.js.map +1 -0
- package/fixtures/cron-jobs.d.ts +1 -0
- package/fixtures/cron-jobs.js +73 -0
- package/fixtures/cron-jobs.js.map +1 -0
- package/fixtures/init.d.ts +1 -0
- package/fixtures/init.js +59 -0
- package/fixtures/init.js.map +1 -0
- package/http/auth.d.ts +2 -0
- package/http/auth.js +763 -0
- package/http/auth.js.map +1 -0
- package/http/health.d.ts +1 -0
- package/http/health.js +12 -0
- package/http/health.js.map +1 -0
- package/http/home.d.ts +2 -0
- package/http/home.js +66 -0
- package/http/home.js.map +1 -0
- package/index.d.ts +23 -0
- package/index.js +127 -0
- package/index.js.map +1 -0
- package/managers/cron.manager.d.ts +17 -0
- package/managers/cron.manager.js +242 -0
- package/managers/cron.manager.js.map +1 -0
- package/managers/method.manager.d.ts +38 -0
- package/managers/method.manager.js +595 -0
- package/managers/method.manager.js.map +1 -0
- package/managers/mongo.manager.d.ts +178 -0
- package/managers/mongo.manager.js +2221 -0
- package/managers/mongo.manager.js.map +1 -0
- package/managers/monitor.manager.d.ts +59 -0
- package/managers/monitor.manager.js +351 -0
- package/managers/monitor.manager.js.map +1 -0
- package/managers/subscription.manager.d.ts +50 -0
- package/managers/subscription.manager.js +1091 -0
- package/managers/subscription.manager.js.map +1 -0
- package/managers/subscription.performance.d.ts +1 -0
- package/{src/managers/subscription.performance.ts → managers/subscription.performance.js} +33 -68
- package/managers/subscription.performance.js.map +1 -0
- package/methods/accounts.d.ts +2 -0
- package/methods/accounts.js +274 -0
- package/methods/accounts.js.map +1 -0
- package/methods/aws.d.ts +2 -0
- package/methods/aws.js +617 -0
- package/methods/aws.js.map +1 -0
- package/methods/collections.d.ts +2 -0
- package/methods/collections.js +499 -0
- package/methods/collections.js.map +1 -0
- package/methods/counters.d.ts +2 -0
- package/methods/counters.js +122 -0
- package/methods/counters.js.map +1 -0
- package/methods/cron-jobs.d.ts +2 -0
- package/methods/cron-jobs.js +1315 -0
- package/methods/cron-jobs.js.map +1 -0
- package/methods/flags.d.ts +2 -0
- package/methods/flags.js +9 -0
- package/methods/flags.js.map +1 -0
- package/methods/logs.d.ts +2 -0
- package/methods/logs.js +371 -0
- package/methods/logs.js.map +1 -0
- package/methods/monitor.d.ts +2 -0
- package/methods/monitor.js +565 -0
- package/methods/monitor.js.map +1 -0
- package/methods/pdf.d.ts +2 -0
- package/methods/pdf.js +468 -0
- package/methods/pdf.js.map +1 -0
- package/methods/report-builder.d.ts +2 -0
- package/methods/report-builder.js +858 -0
- package/methods/report-builder.js.map +1 -0
- package/methods/support.d.ts +2 -0
- package/methods/support.js +246 -0
- package/methods/support.js.map +1 -0
- package/{src/models/app-status.model.ts → models/app-status.model.d.ts} +2 -3
- package/models/app-status.model.js +4 -0
- package/models/app-status.model.js.map +1 -0
- package/{src/models/billing-logged-in-users.model.ts → models/billing-logged-in-users.model.d.ts} +4 -5
- package/models/billing-logged-in-users.model.js +4 -0
- package/models/billing-logged-in-users.model.js.map +1 -0
- package/models/collection-document.model.d.ts +19 -0
- package/models/collection-document.model.js +4 -0
- package/models/collection-document.model.js.map +1 -0
- package/{src/models/counter.model.ts → models/counter.model.d.ts} +3 -4
- package/models/counter.model.js +4 -0
- package/models/counter.model.js.map +1 -0
- package/models/cron-job-history.model.d.ts +12 -0
- package/models/cron-job-history.model.js +4 -0
- package/models/cron-job-history.model.js.map +1 -0
- package/models/cron-job.model.d.ts +13 -0
- package/models/cron-job.model.js +4 -0
- package/models/cron-job.model.js.map +1 -0
- package/models/dialog.model.d.ts +23 -0
- package/models/dialog.model.js +4 -0
- package/models/dialog.model.js.map +1 -0
- package/{src/models/email-history.model.ts → models/email-history.model.d.ts} +7 -8
- package/models/email-history.model.js +4 -0
- package/models/email-history.model.js.map +1 -0
- package/{src/models/email-verified.model.ts → models/email-verified.model.d.ts} +5 -6
- package/models/email-verified.model.js +4 -0
- package/models/email-verified.model.js.map +1 -0
- package/{src/models/file.model.ts → models/file.model.d.ts} +7 -8
- package/models/file.model.js +4 -0
- package/models/file.model.js.map +1 -0
- package/{src/models/flag.model.ts → models/flag.model.d.ts} +3 -4
- package/models/flag.model.js +4 -0
- package/models/flag.model.js.map +1 -0
- package/{src/models/log-method-latency.model.ts → models/log-method-latency.model.d.ts} +4 -5
- package/models/log-method-latency.model.js +4 -0
- package/models/log-method-latency.model.js.map +1 -0
- package/{src/models/log-subscription.model.ts → models/log-subscription.model.d.ts} +6 -8
- package/models/log-subscription.model.js +4 -0
- package/models/log-subscription.model.js.map +1 -0
- package/{src/models/log.model.ts → models/log.model.d.ts} +10 -12
- package/models/log.model.js +4 -0
- package/models/log.model.js.map +1 -0
- package/{src/models/logged-in-users.model.ts → models/logged-in-users.model.d.ts} +5 -6
- package/models/logged-in-users.model.js +4 -0
- package/models/logged-in-users.model.js.map +1 -0
- package/{src/models/method-response.model.ts → models/method-response.model.d.ts} +6 -7
- package/models/method-response.model.js +4 -0
- package/models/method-response.model.js.map +1 -0
- package/models/method.model.d.ts +9 -0
- package/models/method.model.js +4 -0
- package/models/method.model.js.map +1 -0
- package/{src/models/monitor-cpu.model.ts → models/monitor-cpu.model.d.ts} +7 -9
- package/models/monitor-cpu.model.js +4 -0
- package/models/monitor-cpu.model.js.map +1 -0
- package/models/monitor-memory.model.d.ts +15 -0
- package/models/monitor-memory.model.js +4 -0
- package/models/monitor-memory.model.js.map +1 -0
- package/models/monitor-mongo.model.d.ts +13 -0
- package/models/monitor-mongo.model.js +4 -0
- package/models/monitor-mongo.model.js.map +1 -0
- package/{src/models/notification.model.ts → models/notification.model.d.ts} +2 -3
- package/models/notification.model.js +4 -0
- package/models/notification.model.js.map +1 -0
- package/models/pagination.model.d.ts +10 -0
- package/models/pagination.model.js +24 -0
- package/models/pagination.model.js.map +1 -0
- package/models/permission.model.d.ts +12 -0
- package/models/permission.model.js +4 -0
- package/models/permission.model.js.map +1 -0
- package/models/report-builder-dashboard-builder.model.d.ts +25 -0
- package/models/report-builder-dashboard-builder.model.js +4 -0
- package/models/report-builder-dashboard-builder.model.js.map +1 -0
- package/models/report-builder-library.model.d.ts +17 -0
- package/models/report-builder-library.model.js +4 -0
- package/models/report-builder-library.model.js.map +1 -0
- package/models/report-builder-report.model.d.ts +98 -0
- package/models/report-builder-report.model.js +4 -0
- package/models/report-builder-report.model.js.map +1 -0
- package/models/report-builder.model.d.ts +61 -0
- package/models/report-builder.model.js +4 -0
- package/models/report-builder.model.js.map +1 -0
- package/models/select-data-label.model.d.ts +9 -0
- package/models/select-data-label.model.js +4 -0
- package/models/select-data-label.model.js.map +1 -0
- package/models/server-response.model.d.ts +5 -0
- package/models/server-response.model.js +4 -0
- package/models/server-response.model.js.map +1 -0
- package/models/subscription.model.d.ts +23 -0
- package/models/subscription.model.js +4 -0
- package/models/subscription.model.js.map +1 -0
- package/models/support-ticket.model.d.ts +72 -0
- package/models/support-ticket.model.js +4 -0
- package/models/support-ticket.model.js.map +1 -0
- package/models/user-group.model.d.ts +19 -0
- package/models/user-group.model.js +4 -0
- package/models/user-group.model.js.map +1 -0
- package/{src/models/user-guide.model.ts → models/user-guide.model.d.ts} +4 -5
- package/models/user-guide.model.js +4 -0
- package/models/user-guide.model.js.map +1 -0
- package/models/user.model.d.ts +70 -0
- package/models/user.model.js +4 -0
- package/models/user.model.js.map +1 -0
- package/package.json +1 -1
- package/{src/public_api.ts → public_api.d.ts} +1 -1
- package/public_api.js +75 -0
- package/public_api.js.map +1 -0
- package/publications/app-status.d.ts +2 -0
- package/publications/app-status.js +17 -0
- package/publications/app-status.js.map +1 -0
- package/publications/cron-jobs.d.ts +2 -0
- package/publications/cron-jobs.js +33 -0
- package/publications/cron-jobs.js.map +1 -0
- package/publications/files.d.ts +2 -0
- package/publications/files.js +37 -0
- package/publications/files.js.map +1 -0
- package/publications/flags.d.ts +2 -0
- package/publications/flags.js +23 -0
- package/publications/flags.js.map +1 -0
- package/publications/logs.d.ts +2 -0
- package/publications/logs.js +165 -0
- package/publications/logs.js.map +1 -0
- package/publications/method-responses.d.ts +2 -0
- package/publications/method-responses.js +17 -0
- package/publications/method-responses.js.map +1 -0
- package/publications/notifications.d.ts +2 -0
- package/publications/notifications.js +17 -0
- package/publications/notifications.js.map +1 -0
- package/publications/report-builder-dashboard-builders.d.ts +2 -0
- package/publications/report-builder-dashboard-builders.js +43 -0
- package/publications/report-builder-dashboard-builders.js.map +1 -0
- package/publications/report-builder-libraries.d.ts +2 -0
- package/publications/report-builder-libraries.js +90 -0
- package/publications/report-builder-libraries.js.map +1 -0
- package/publications/report-builder-reports.d.ts +2 -0
- package/publications/report-builder-reports.js +51 -0
- package/publications/report-builder-reports.js.map +1 -0
- package/publications/super-admin.d.ts +2 -0
- package/publications/super-admin.js +17 -0
- package/publications/super-admin.js.map +1 -0
- package/publications/user-groups.d.ts +1 -0
- package/publications/user-groups.js +17 -0
- package/publications/user-groups.js.map +1 -0
- package/publications/user-guides.d.ts +1 -0
- package/publications/user-guides.js +17 -0
- package/publications/user-guides.js.map +1 -0
- package/server-app.d.ts +52 -0
- package/server-app.js +739 -0
- package/server-app.js.map +1 -0
- package/util/common.d.ts +25 -0
- package/util/common.js +524 -0
- package/util/common.js.map +1 -0
- package/util/schema-report-builder.d.ts +6 -0
- package/util/schema-report-builder.js +453 -0
- package/util/schema-report-builder.js.map +1 -0
- package/.nodemon.json +0 -5
- package/.vscode/settings.json +0 -3
- package/README.md +0 -22
- package/compileDTS.pl +0 -64
- package/gulpfile.js +0 -127
- package/mongodbensurers.js +0 -2
- package/mongostop.js +0 -3
- package/settings.development.json +0 -13
- package/src/client-server-app.ts +0 -7
- package/src/collections/app-status.collection.ts +0 -51
- package/src/collections/counter.collection.ts +0 -54
- package/src/collections/cron-job-history.collection.ts +0 -82
- package/src/collections/cron-job.collection.ts +0 -85
- package/src/collections/email-history.collection.ts +0 -66
- package/src/collections/email-verified.collection.ts +0 -61
- package/src/collections/file.collection.ts +0 -73
- package/src/collections/flag.collection.ts +0 -56
- package/src/collections/log-method-latency.collection.ts +0 -64
- package/src/collections/log-subscription.collection.ts +0 -68
- package/src/collections/log-ts.collection.ts +0 -78
- package/src/collections/log.collection.ts +0 -77
- package/src/collections/logged-in-users.collection.ts +0 -65
- package/src/collections/method-response.collection.ts +0 -66
- package/src/collections/monitor-cpu.collection.ts +0 -63
- package/src/collections/monitor-memory.collection.ts +0 -75
- package/src/collections/monitor-mongo.collection.ts +0 -69
- package/src/collections/notification.collection.ts +0 -51
- package/src/collections/report-builder-dashboard-builder.collection.ts +0 -109
- package/src/collections/report-builder-library.collection.ts +0 -89
- package/src/collections/report-builder-report.collection.ts +0 -149
- package/src/collections/user-group.collection.ts +0 -90
- package/src/collections/user-guide.collection.ts +0 -57
- package/src/collections/user.collection.ts +0 -259
- package/src/cron/cron.ts +0 -188
- package/src/fixtures/cron-jobs.ts +0 -25
- package/src/fixtures/init.ts +0 -10
- package/src/http/auth.ts +0 -732
- package/src/http/health.ts +0 -7
- package/src/http/home.ts +0 -71
- package/src/index.ts +0 -71
- package/src/managers/cron.manager.ts +0 -208
- package/src/managers/method.manager.ts +0 -607
- package/src/managers/mongo.manager.ts +0 -2282
- package/src/managers/monitor.manager.ts +0 -323
- package/src/managers/subscription.manager.ts +0 -1196
- package/src/methods/accounts.ts +0 -202
- package/src/methods/aws.ts +0 -507
- package/src/methods/collections.ts +0 -512
- package/src/methods/counters.ts +0 -75
- package/src/methods/cron-jobs.ts +0 -1454
- package/src/methods/flags.ts +0 -7
- package/src/methods/logs.ts +0 -327
- package/src/methods/monitor.ts +0 -548
- package/src/methods/pdf.ts +0 -615
- package/src/methods/report-builder.ts +0 -876
- package/src/methods/support.ts +0 -146
- package/src/models/collection-document.model.ts +0 -22
- package/src/models/cron-job-history.model.ts +0 -13
- package/src/models/cron-job.model.ts +0 -14
- package/src/models/dialog.model.ts +0 -25
- package/src/models/method.model.ts +0 -11
- package/src/models/monitor-memory.model.ts +0 -17
- package/src/models/monitor-mongo.model.ts +0 -15
- package/src/models/pagination.model.ts +0 -30
- package/src/models/permission.model.ts +0 -14
- package/src/models/report-builder-dashboard-builder.model.ts +0 -29
- package/src/models/report-builder-library.model.ts +0 -20
- package/src/models/report-builder-report.model.ts +0 -110
- package/src/models/report-builder.model.ts +0 -68
- package/src/models/select-data-label.model.ts +0 -9
- package/src/models/server-response.model.ts +0 -5
- package/src/models/subscription.model.ts +0 -64
- package/src/models/support-ticket.model.ts +0 -81
- package/src/models/user-group.model.ts +0 -23
- package/src/models/user.model.ts +0 -79
- package/src/publications/app-status.ts +0 -13
- package/src/publications/cron-jobs.ts +0 -30
- package/src/publications/files.ts +0 -34
- package/src/publications/flags.ts +0 -20
- package/src/publications/logs.ts +0 -164
- package/src/publications/method-responses.ts +0 -13
- package/src/publications/notifications.ts +0 -13
- package/src/publications/report-builder-dashboard-builders.ts +0 -39
- package/src/publications/report-builder-libraries.ts +0 -41
- package/src/publications/report-builder-reports.ts +0 -48
- package/src/publications/super-admin.ts +0 -13
- package/src/publications/user-groups.ts +0 -12
- package/src/publications/user-guides.ts +0 -12
- package/src/server-app.ts +0 -769
- package/src/util/common.ts +0 -519
- package/src/util/schema-report-builder.ts +0 -413
- package/tsconfig.json +0 -30
- package/tslint.json +0 -143
- /package/{src/private → private}/email-templates/enrollment.html +0 -0
- /package/{src/private → private}/email-templates/forgot-password.html +0 -0
- /package/{src/private → private}/email-templates/support-ticket-deleted.html +0 -0
- /package/{src/private → private}/email-templates/support-ticket-modified.html +0 -0
- /package/{src/private → private}/email-templates/support-ticket.html +0 -0
- /package/{src/private → private}/images/ResolveIO.png +0 -0
package/README.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
## Copyright
|
|
2
|
-
|
|
3
|
-
Copyright © 2017-2019 ResolveIO, LLC. All Rights Reserved. This work is to be used/viewed by ResolveIO, LLC Employees ONLY.
|
|
4
|
-
|
|
5
|
-
## ResolveIO Command Line
|
|
6
|
-
|
|
7
|
-
- `$ npm run server` - Run the server application.
|
|
8
|
-
- `$ npm run build-prod` - Build production (dist folder).
|
|
9
|
-
- `$ npm run package` - Build tarball for npm publish (version inside package json, must rebuild if changed)
|
|
10
|
-
- `$ npm publish ./resolveio-server-lib-x.x.x.tgz` - Publish tarball to npm
|
|
11
|
-
|
|
12
|
-
## Contents
|
|
13
|
-
|
|
14
|
-
This package contains:
|
|
15
|
-
|
|
16
|
-
- ResolveIO Server Library
|
|
17
|
-
|
|
18
|
-
### Server
|
|
19
|
-
|
|
20
|
-
The `server` folder contain single TypeScript (`.ts`) file which is the main file (`/server/src/index.ts`), and creates both connections to client-database and resolveio-support database, then creates the main server instance, and then starts it.
|
|
21
|
-
|
|
22
|
-
All other server files should be located under `/server/src/*`.
|
package/compileDTS.pl
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
use strict;
|
|
2
|
-
use warnings;
|
|
3
|
-
use JSON;
|
|
4
|
-
|
|
5
|
-
my @allIds;
|
|
6
|
-
|
|
7
|
-
my $dir = './dist';
|
|
8
|
-
|
|
9
|
-
my $extraFiles = '';
|
|
10
|
-
|
|
11
|
-
search_dir($dir);
|
|
12
|
-
|
|
13
|
-
sub search_dir {
|
|
14
|
-
|
|
15
|
-
my ($locdir) = @_;
|
|
16
|
-
# print "Entered search_dir sub, working with directory => $locdir \n";
|
|
17
|
-
my $dh; # handle
|
|
18
|
-
|
|
19
|
-
if ( !opendir ($dh, $locdir)) {
|
|
20
|
-
warn "Unable to open $locdir: $!\n";
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
my @FILES = grep { $_ ne '.' && $_ ne '..' } readdir($dh);
|
|
25
|
-
|
|
26
|
-
foreach my $file (@FILES) {
|
|
27
|
-
my $path = "$locdir/$file";
|
|
28
|
-
if ( -d $path ) {
|
|
29
|
-
# print "Directory $path found\n";
|
|
30
|
-
search_dir ($path);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
if ($file =~ m/.d.ts/ and $file !~ m/index.d.ts/) {
|
|
34
|
-
# print "Open file $path\n";
|
|
35
|
-
open (FILE, "<", "$path");
|
|
36
|
-
my @lines = <FILE>;
|
|
37
|
-
close FILE;
|
|
38
|
-
chomp @lines;
|
|
39
|
-
|
|
40
|
-
for (my $k = 0; $k < scalar(@lines); $k++) {
|
|
41
|
-
if ($lines[$k] =~ m/^export / and $lines[$k] !~ m/export {};/) {
|
|
42
|
-
$extraFiles .= $lines[$k] . "\n";
|
|
43
|
-
|
|
44
|
-
if ($lines[$k] =~ m/\{\s*$/) {
|
|
45
|
-
while($lines[++$k] !~ m/^\};?\s*$/) {
|
|
46
|
-
$extraFiles .= $lines[$k] . "\n";
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
$extraFiles .= $lines[$k] . "\n";
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
closedir ($dh);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
print "Extras\n\n$extraFiles";
|
|
61
|
-
|
|
62
|
-
open (FILE, ">>", "./dist/index.d.ts");
|
|
63
|
-
print FILE "\n$extraFiles";
|
|
64
|
-
close FILE;
|
package/gulpfile.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
var gulp = require("gulp");
|
|
2
|
-
var exec = require('child_process').exec;
|
|
3
|
-
var rename = require("gulp-rename");
|
|
4
|
-
var del = require('del');
|
|
5
|
-
var sourcemaps = require('gulp-sourcemaps');
|
|
6
|
-
var zip = require('gulp-zip');
|
|
7
|
-
var ts = require("gulp-typescript");
|
|
8
|
-
var tsProject = ts.createProject("tsconfig.json");
|
|
9
|
-
var nodemon = require("gulp-nodemon");
|
|
10
|
-
var mkdirs = require('mkdirs');
|
|
11
|
-
var merge = require('merge2');
|
|
12
|
-
|
|
13
|
-
var paths = {
|
|
14
|
-
src: 'src/**/*',
|
|
15
|
-
srcTS: 'src/**/*.ts',
|
|
16
|
-
srcPrivate: 'src/private/**/*',
|
|
17
|
-
|
|
18
|
-
tmp: 'tmp',
|
|
19
|
-
tmpJS: 'tmp/**/*.js',
|
|
20
|
-
tmpPrivate: 'tmp/private',
|
|
21
|
-
|
|
22
|
-
dist: 'dist',
|
|
23
|
-
distJS: 'dist/**/*.js',
|
|
24
|
-
distPrivate: 'dist/private',
|
|
25
|
-
|
|
26
|
-
dbDir: 'mongo/data/db',
|
|
27
|
-
dbLogs: 'mongo/log'
|
|
28
|
-
};
|
|
29
|
-
var shell = require('gulp-shell');
|
|
30
|
-
|
|
31
|
-
gulp.task('clean', function () {
|
|
32
|
-
return del([paths.tmp, paths.dist]);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
gulp.task("mongo-start", function() {
|
|
36
|
-
mkdirs(paths.dbDir);
|
|
37
|
-
mkdirs(paths.dbLogs);
|
|
38
|
-
|
|
39
|
-
return gulp.src('.')
|
|
40
|
-
.pipe(shell('mongod --fork --dbpath '+paths.dbDir+'/ --logpath '+paths.dbLogs+'/mongo.log --port 3001 --replSet rs0'))
|
|
41
|
-
.pipe(shell(['mongo --port 3001 < mongodbensurers.js']));
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
gulp.task("mongo-stop", function() {
|
|
45
|
-
return gulp.src('.')
|
|
46
|
-
.pipe(shell(['killall mongod']));
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
gulp.task("config", gulp.series("clean", function() {
|
|
50
|
-
return gulp.src('./settings.development.json')
|
|
51
|
-
.pipe(rename('settings.json'))
|
|
52
|
-
.pipe(gulp.dest(paths.tmp));
|
|
53
|
-
}));
|
|
54
|
-
|
|
55
|
-
gulp.task("email-templates", function() {
|
|
56
|
-
return gulp.src(paths.srcPrivate)
|
|
57
|
-
.pipe(gulp.dest(paths.tmpPrivate));
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
gulp.task("compile", function () {
|
|
61
|
-
const tsResult = tsProject.src()
|
|
62
|
-
.pipe(sourcemaps.init())
|
|
63
|
-
.pipe(tsProject());
|
|
64
|
-
|
|
65
|
-
return tsResult.js.pipe(
|
|
66
|
-
sourcemaps.mapSources((sourcePath, file) => {
|
|
67
|
-
return sourcePath; // rewrite sourcePath to point to the correct TypeScript file paths
|
|
68
|
-
})
|
|
69
|
-
).pipe(sourcemaps.write("./")).pipe(gulp.dest(paths.tmp));
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
gulp.task('watch', function (done) {
|
|
73
|
-
gulp.watch([paths.src, './node_modules'], gulp.series('compile'));
|
|
74
|
-
|
|
75
|
-
done();
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
gulp.task("default", gulp.parallel(gulp.series("config", "email-templates", 'compile', (done) => {
|
|
79
|
-
nodemon({
|
|
80
|
-
script: "tmp/client-server-app.js",
|
|
81
|
-
watch: "tmp",
|
|
82
|
-
// exec: 'node --inspect-brk --max-old-space-size=1800 --trace-warnings',
|
|
83
|
-
exec: 'node --inspect --max-old-space-size=1800 --trace-warnings',
|
|
84
|
-
delay: 500
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
done();
|
|
88
|
-
}), 'watch'));
|
|
89
|
-
|
|
90
|
-
gulp.task("config:dist", gulp.series("clean", function() {
|
|
91
|
-
return gulp.src('./settings.production.json')
|
|
92
|
-
.pipe(rename('settings.json'))
|
|
93
|
-
.pipe(gulp.dest(paths.dist));
|
|
94
|
-
}));
|
|
95
|
-
|
|
96
|
-
gulp.task("email-templates:dist", function() {
|
|
97
|
-
return gulp.src(paths.srcPrivate)
|
|
98
|
-
.pipe(gulp.dest(paths.distPrivate));
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
gulp.task("compile:dist", function () {
|
|
102
|
-
var tsResult = gulp.src('src/**/*.ts')
|
|
103
|
-
.pipe(sourcemaps.init())
|
|
104
|
-
.pipe(ts('tsconfig.json'));
|
|
105
|
-
return merge([tsResult.dts.pipe(gulp.dest(paths.dist)), tsResult.js.pipe(
|
|
106
|
-
sourcemaps.mapSources((sourcePath, file) => {
|
|
107
|
-
return sourcePath; // rewrite sourcePath to point to the correct TypeScript file paths
|
|
108
|
-
})
|
|
109
|
-
).pipe(sourcemaps.write("./")).pipe(gulp.dest(paths.dist))]);
|
|
110
|
-
|
|
111
|
-
// return tsProject.src()
|
|
112
|
-
// .pipe(sourcemaps.init({loadMaps: true}))
|
|
113
|
-
// .pipe(tsProject())
|
|
114
|
-
// .js.pipe(uglify())
|
|
115
|
-
// .pipe(sourcemaps.write('./'))
|
|
116
|
-
// .pipe(gulp.dest(paths.dist));
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
gulp.task("packages:dist", function () {
|
|
120
|
-
return gulp.src("./package.json")
|
|
121
|
-
.pipe(gulp.dest(paths.dist));
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
// gulp.task("build-prod", ["config:dist", "email-templates:dist", "compile:dist", "packages:dist", "npm:dist", "eb:dist", "perl"], function () {
|
|
125
|
-
gulp.task("build-prod", gulp.series("config", "email-templates:dist", "compile:dist", "packages:dist", function () {
|
|
126
|
-
return gulp.src(paths.dist + "/**/*", {dot : true});
|
|
127
|
-
}));
|
package/mongodbensurers.js
DELETED
package/mongostop.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"CLIENT_NAME": "ResolveIO",
|
|
3
|
-
"MONGO_URL": "mongodb://localhost:3001/resolveio",
|
|
4
|
-
"OPLOG_URL": "mongodb://localhost:3001/local",
|
|
5
|
-
"MAIL_URL": "smtps://AKIAISVPD3SREQHE523Q:Ar3qzozs3JFxu00Uw94FBatPKJydEZeBBvdqmpniVSt6@email-smtp.us-east-1.amazonaws.com:465/",
|
|
6
|
-
"MAIL_FROM": "dev@resolveio.com",
|
|
7
|
-
"ROOT_URL": "http://localhost:4200",
|
|
8
|
-
"SERVER_URL": "http://localhost:8080",
|
|
9
|
-
"TWILIO_SID": "AC6338adffd405964cf4d2cf0af59abd2e",
|
|
10
|
-
"TWILIO_AUTH_TOKEN": "8ae1086fff332e069f0b3582e6dafc72",
|
|
11
|
-
"TWILIO_PHONE_NUMBER": "+19097666028",
|
|
12
|
-
"JWT_SECRET": "tr3dkmoXWcWGAUxywETXqkpb"
|
|
13
|
-
}
|
package/src/client-server-app.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { ResolveIOServer } from '../index';
|
|
2
|
-
import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';
|
|
3
|
-
import { AppStatusModel } from '../models/app-status.model';
|
|
4
|
-
|
|
5
|
-
let schema: any = {
|
|
6
|
-
_id: {
|
|
7
|
-
type: String,
|
|
8
|
-
optional: true
|
|
9
|
-
},
|
|
10
|
-
__v: {
|
|
11
|
-
type: Number,
|
|
12
|
-
optional: true
|
|
13
|
-
},
|
|
14
|
-
updatedAt: {
|
|
15
|
-
type: Date,
|
|
16
|
-
optional: true
|
|
17
|
-
},
|
|
18
|
-
createdAt: {
|
|
19
|
-
type: Date,
|
|
20
|
-
optional: true
|
|
21
|
-
},
|
|
22
|
-
message: {
|
|
23
|
-
type: String
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export let AppStatus: MongoManagerCollection<AppStatusModel> = null;
|
|
28
|
-
|
|
29
|
-
initializeCollection();
|
|
30
|
-
|
|
31
|
-
function initializeCollection() {
|
|
32
|
-
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
33
|
-
const model = new MongoManagerModel<AppStatusModel>({
|
|
34
|
-
collectionName: 'app-statuses',
|
|
35
|
-
schema: schema,
|
|
36
|
-
useVersionCollection: false,
|
|
37
|
-
useReportBuilder: false,
|
|
38
|
-
reportBuilderLookupTables: [],
|
|
39
|
-
timestamps: true,
|
|
40
|
-
createLogs: false,
|
|
41
|
-
checkSchema: true,
|
|
42
|
-
collectionOptions: null
|
|
43
|
-
});
|
|
44
|
-
AppStatus = model.collection_main;
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
setTimeout(() => {
|
|
48
|
-
initializeCollection();
|
|
49
|
-
}, 1);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ResolveIOServer } from '../index';
|
|
2
|
-
import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';
|
|
3
|
-
import { CounterModel } from '../models/counter.model';
|
|
4
|
-
|
|
5
|
-
let schema: any = {
|
|
6
|
-
_id: {
|
|
7
|
-
type: String,
|
|
8
|
-
optional: true
|
|
9
|
-
},
|
|
10
|
-
__v: {
|
|
11
|
-
type: Number,
|
|
12
|
-
optional: true
|
|
13
|
-
},
|
|
14
|
-
updatedAt: {
|
|
15
|
-
type: Date,
|
|
16
|
-
optional: true
|
|
17
|
-
},
|
|
18
|
-
createdAt: {
|
|
19
|
-
type: Date,
|
|
20
|
-
optional: true
|
|
21
|
-
},
|
|
22
|
-
type: {
|
|
23
|
-
type: String
|
|
24
|
-
},
|
|
25
|
-
count: {
|
|
26
|
-
type: Number
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export let Counters: MongoManagerCollection<CounterModel> = null;
|
|
31
|
-
|
|
32
|
-
initializeCollection();
|
|
33
|
-
|
|
34
|
-
function initializeCollection() {
|
|
35
|
-
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
36
|
-
const model = new MongoManagerModel<CounterModel>({
|
|
37
|
-
collectionName: 'counters',
|
|
38
|
-
schema: schema,
|
|
39
|
-
useVersionCollection: false,
|
|
40
|
-
useReportBuilder: false,
|
|
41
|
-
reportBuilderLookupTables: [],
|
|
42
|
-
timestamps: true,
|
|
43
|
-
createLogs: false,
|
|
44
|
-
checkSchema: true,
|
|
45
|
-
collectionOptions: null
|
|
46
|
-
});
|
|
47
|
-
Counters = model.collection_main;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
setTimeout(() => {
|
|
51
|
-
initializeCollection();
|
|
52
|
-
}, 1);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { ResolveIOServer } from '../index';
|
|
2
|
-
import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';
|
|
3
|
-
import { CronJobHistoryModel } from '../models/cron-job-history.model';
|
|
4
|
-
|
|
5
|
-
let schema: any = {
|
|
6
|
-
_id: {
|
|
7
|
-
type: String,
|
|
8
|
-
optional: true
|
|
9
|
-
},
|
|
10
|
-
__v: {
|
|
11
|
-
type: Number,
|
|
12
|
-
optional: true
|
|
13
|
-
},
|
|
14
|
-
updatedAt: {
|
|
15
|
-
type: Date,
|
|
16
|
-
optional: true
|
|
17
|
-
},
|
|
18
|
-
createdAt: {
|
|
19
|
-
type: Date,
|
|
20
|
-
optional: true
|
|
21
|
-
},
|
|
22
|
-
name: {
|
|
23
|
-
type: String
|
|
24
|
-
},
|
|
25
|
-
reoccuring: {
|
|
26
|
-
type: Boolean
|
|
27
|
-
},
|
|
28
|
-
time_to_run: {
|
|
29
|
-
type: String
|
|
30
|
-
},
|
|
31
|
-
method_name: {
|
|
32
|
-
type: String
|
|
33
|
-
},
|
|
34
|
-
last_run: {
|
|
35
|
-
type: Date
|
|
36
|
-
},
|
|
37
|
-
next_run: {
|
|
38
|
-
type: Date
|
|
39
|
-
},
|
|
40
|
-
id_cronjob: {
|
|
41
|
-
type: String
|
|
42
|
-
},
|
|
43
|
-
passed: {
|
|
44
|
-
type: Boolean
|
|
45
|
-
},
|
|
46
|
-
error: {
|
|
47
|
-
type: String
|
|
48
|
-
},
|
|
49
|
-
start_time: {
|
|
50
|
-
type: Date
|
|
51
|
-
},
|
|
52
|
-
end_time: {
|
|
53
|
-
type: Date
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export let CronJobHistory: MongoManagerCollection<CronJobHistoryModel> = null;
|
|
58
|
-
|
|
59
|
-
initializeCollection();
|
|
60
|
-
|
|
61
|
-
function initializeCollection() {
|
|
62
|
-
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
63
|
-
const model = new MongoManagerModel<CronJobHistoryModel>({
|
|
64
|
-
collectionName: 'cron-job-histories',
|
|
65
|
-
schema: schema,
|
|
66
|
-
useVersionCollection: false,
|
|
67
|
-
useReportBuilder: false,
|
|
68
|
-
reportBuilderLookupTables: [],
|
|
69
|
-
timestamps: true,
|
|
70
|
-
createLogs: false,
|
|
71
|
-
checkSchema: true,
|
|
72
|
-
collectionOptions: null
|
|
73
|
-
});
|
|
74
|
-
CronJobHistory = model.collection_main;
|
|
75
|
-
CronJobHistory.createIndex({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 7});
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
setTimeout(() => {
|
|
79
|
-
initializeCollection();
|
|
80
|
-
}, 1);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { ResolveIOServer } from '../index';
|
|
2
|
-
import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';
|
|
3
|
-
import { CronJobModel } from '../models/cron-job.model';
|
|
4
|
-
|
|
5
|
-
let schema: any = {
|
|
6
|
-
_id: {
|
|
7
|
-
type: String,
|
|
8
|
-
optional: true
|
|
9
|
-
},
|
|
10
|
-
__v: {
|
|
11
|
-
type: Number,
|
|
12
|
-
optional: true
|
|
13
|
-
},
|
|
14
|
-
updatedAt: {
|
|
15
|
-
type: Date,
|
|
16
|
-
optional: true
|
|
17
|
-
},
|
|
18
|
-
createdAt: {
|
|
19
|
-
type: Date,
|
|
20
|
-
optional: true
|
|
21
|
-
},
|
|
22
|
-
name: {
|
|
23
|
-
type: String
|
|
24
|
-
},
|
|
25
|
-
repeat: {
|
|
26
|
-
type: Boolean
|
|
27
|
-
},
|
|
28
|
-
time_to_run: {
|
|
29
|
-
type: String
|
|
30
|
-
},
|
|
31
|
-
method_run: {
|
|
32
|
-
type: String
|
|
33
|
-
},
|
|
34
|
-
method_run_data: {
|
|
35
|
-
type: Object,
|
|
36
|
-
blackbox: true,
|
|
37
|
-
optional: true
|
|
38
|
-
},
|
|
39
|
-
method_complete: {
|
|
40
|
-
type: String,
|
|
41
|
-
optional: true
|
|
42
|
-
},
|
|
43
|
-
method_complete_data: {
|
|
44
|
-
type: Object,
|
|
45
|
-
blackbox: true,
|
|
46
|
-
optional: true
|
|
47
|
-
},
|
|
48
|
-
running: {
|
|
49
|
-
type: Boolean
|
|
50
|
-
},
|
|
51
|
-
timezone: {
|
|
52
|
-
type: String,
|
|
53
|
-
optional: true
|
|
54
|
-
},
|
|
55
|
-
next_run: {
|
|
56
|
-
type: Date,
|
|
57
|
-
optional: true
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export let CronJobs: MongoManagerCollection<CronJobModel> = null;
|
|
62
|
-
|
|
63
|
-
initializeCollection();
|
|
64
|
-
|
|
65
|
-
function initializeCollection() {
|
|
66
|
-
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
67
|
-
const model = new MongoManagerModel<CronJobModel>({
|
|
68
|
-
collectionName: 'cron-jobs',
|
|
69
|
-
schema: schema,
|
|
70
|
-
useVersionCollection: false,
|
|
71
|
-
useReportBuilder: false,
|
|
72
|
-
reportBuilderLookupTables: [],
|
|
73
|
-
timestamps: true,
|
|
74
|
-
createLogs: false,
|
|
75
|
-
checkSchema: true,
|
|
76
|
-
collectionOptions: null
|
|
77
|
-
});
|
|
78
|
-
CronJobs = model.collection_main;
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
setTimeout(() => {
|
|
82
|
-
initializeCollection();
|
|
83
|
-
}, 1);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { ResolveIOServer } from '../index';
|
|
2
|
-
import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';
|
|
3
|
-
import { EmailHistoryModel } from '../models/email-history.model';
|
|
4
|
-
|
|
5
|
-
let schema: any = {
|
|
6
|
-
_id: {
|
|
7
|
-
type: String,
|
|
8
|
-
optional: true
|
|
9
|
-
},
|
|
10
|
-
__v: {
|
|
11
|
-
type: Number,
|
|
12
|
-
optional: true
|
|
13
|
-
},
|
|
14
|
-
updatedAt: {
|
|
15
|
-
type: Date,
|
|
16
|
-
optional: true
|
|
17
|
-
},
|
|
18
|
-
createdAt: {
|
|
19
|
-
type: Date,
|
|
20
|
-
optional: true
|
|
21
|
-
},
|
|
22
|
-
date: {
|
|
23
|
-
type: Date
|
|
24
|
-
},
|
|
25
|
-
id_user: {
|
|
26
|
-
type: String
|
|
27
|
-
},
|
|
28
|
-
user: {
|
|
29
|
-
type: String
|
|
30
|
-
},
|
|
31
|
-
email: {
|
|
32
|
-
type: String
|
|
33
|
-
},
|
|
34
|
-
success: {
|
|
35
|
-
type: Boolean
|
|
36
|
-
},
|
|
37
|
-
verified: {
|
|
38
|
-
type: Boolean
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export let EmailHistories: MongoManagerCollection<EmailHistoryModel> = null;
|
|
43
|
-
|
|
44
|
-
initializeCollection();
|
|
45
|
-
|
|
46
|
-
function initializeCollection() {
|
|
47
|
-
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
48
|
-
const model = new MongoManagerModel<EmailHistoryModel>({
|
|
49
|
-
collectionName: 'email-histories',
|
|
50
|
-
schema: schema,
|
|
51
|
-
useVersionCollection: false,
|
|
52
|
-
useReportBuilder: false,
|
|
53
|
-
reportBuilderLookupTables: [],
|
|
54
|
-
timestamps: true,
|
|
55
|
-
createLogs: false,
|
|
56
|
-
checkSchema: true,
|
|
57
|
-
collectionOptions: null
|
|
58
|
-
});
|
|
59
|
-
EmailHistories = model.collection_main;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
setTimeout(() => {
|
|
63
|
-
initializeCollection();
|
|
64
|
-
}, 1);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { ResolveIOServer } from '../index';
|
|
2
|
-
import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';
|
|
3
|
-
import { EmailVerifiedModel } from '../models/email-verified.model';
|
|
4
|
-
|
|
5
|
-
let schema: any = {
|
|
6
|
-
_id: {
|
|
7
|
-
type: String,
|
|
8
|
-
optional: true
|
|
9
|
-
},
|
|
10
|
-
__v: {
|
|
11
|
-
type: Number,
|
|
12
|
-
optional: true
|
|
13
|
-
},
|
|
14
|
-
updatedAt: {
|
|
15
|
-
type: Date,
|
|
16
|
-
optional: true
|
|
17
|
-
},
|
|
18
|
-
createdAt: {
|
|
19
|
-
type: Date,
|
|
20
|
-
optional: true
|
|
21
|
-
},
|
|
22
|
-
date: {
|
|
23
|
-
type: Date
|
|
24
|
-
},
|
|
25
|
-
id_user: {
|
|
26
|
-
type: String
|
|
27
|
-
},
|
|
28
|
-
user: {
|
|
29
|
-
type: String
|
|
30
|
-
},
|
|
31
|
-
email: {
|
|
32
|
-
type: String
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export let EmailVerifies: MongoManagerCollection<EmailVerifiedModel> = null;
|
|
37
|
-
|
|
38
|
-
initializeCollection();
|
|
39
|
-
|
|
40
|
-
function initializeCollection() {
|
|
41
|
-
if (ResolveIOServer && ResolveIOServer.getMainDB()) {
|
|
42
|
-
const model = new MongoManagerModel<EmailVerifiedModel>({
|
|
43
|
-
collectionName: 'email-verifies',
|
|
44
|
-
schema: schema,
|
|
45
|
-
useVersionCollection: false,
|
|
46
|
-
useReportBuilder: false,
|
|
47
|
-
reportBuilderLookupTables: [],
|
|
48
|
-
timestamps: true,
|
|
49
|
-
createLogs: false,
|
|
50
|
-
checkSchema: true,
|
|
51
|
-
collectionOptions: null
|
|
52
|
-
});
|
|
53
|
-
EmailVerifies = model.collection_main;
|
|
54
|
-
EmailVerifies.createIndex({email: 1});
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
setTimeout(() => {
|
|
58
|
-
initializeCollection();
|
|
59
|
-
}, 1);
|
|
60
|
-
}
|
|
61
|
-
}
|