@resolveio/server-lib 5.2.39 → 5.2.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client-server-app.js +2 -0
- package/client-server-app.js.map +1 -0
- package/collections/active-subscription.collection.js +2 -0
- package/collections/active-subscription.collection.js.map +1 -0
- package/collections/app-status.collection.js +2 -0
- package/collections/app-status.collection.js.map +1 -0
- package/collections/app-version.collection.js +2 -0
- package/collections/app-version.collection.js.map +1 -0
- package/collections/billing-logged-in-users.collection.js +2 -0
- package/collections/billing-logged-in-users.collection.js.map +1 -0
- package/collections/counter.collection.js +2 -0
- package/collections/counter.collection.js.map +1 -0
- package/collections/cron-job-history.collection.js +2 -0
- package/collections/cron-job-history.collection.js.map +1 -0
- package/collections/cron-job.collection.js +2 -0
- package/collections/cron-job.collection.js.map +1 -0
- package/collections/file.collection.js +2 -0
- package/collections/file.collection.js.map +1 -0
- package/collections/flag.collection.js +2 -0
- package/collections/flag.collection.js.map +1 -0
- package/collections/log-method-latency.collection.js +2 -0
- package/collections/log-method-latency.collection.js.map +1 -0
- package/collections/log-subscription.collection.js +2 -0
- package/collections/log-subscription.collection.js.map +1 -0
- package/collections/log.collection.js +2 -0
- package/collections/log.collection.js.map +1 -0
- package/collections/logged-in-users.collection.js +2 -0
- package/collections/logged-in-users.collection.js.map +1 -0
- package/collections/method-call.collection.js +2 -0
- package/collections/method-call.collection.js.map +1 -0
- package/collections/method-response.collection.js +2 -0
- package/collections/method-response.collection.js.map +1 -0
- package/collections/notification.collection.js +2 -0
- package/collections/notification.collection.js.map +1 -0
- package/collections/queue-flag.collection.js +2 -0
- package/collections/queue-flag.collection.js.map +1 -0
- package/collections/queue-method.collection.js +2 -0
- package/collections/queue-method.collection.js.map +1 -0
- package/collections/queue-response.collection.js +2 -0
- package/collections/queue-response.collection.js.map +1 -0
- package/collections/report-builder-report.collection.js +2 -0
- package/collections/report-builder-report.collection.js.map +1 -0
- package/collections/support-ticket.collection.js +2 -0
- package/collections/support-ticket.collection.js.map +1 -0
- package/collections/user.collection.js +2 -0
- package/collections/user.collection.js.map +1 -0
- package/cron/cron.js +2 -0
- package/cron/cron.js.map +1 -0
- package/fixtures/cron-jobs.js +2 -0
- package/fixtures/cron-jobs.js.map +1 -0
- package/fixtures/init.js +2 -0
- package/fixtures/init.js.map +1 -0
- package/http/auth.js +2 -0
- package/http/auth.js.map +1 -0
- package/http/health.js +2 -0
- package/http/health.js.map +1 -0
- package/http/home.js +2 -0
- package/http/home.js.map +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -0
- package/managers/cron.manager.js +2 -0
- package/managers/cron.manager.js.map +1 -0
- package/managers/database.manager.js +2 -0
- package/managers/database.manager.js.map +1 -0
- package/managers/method.manager.js +2 -0
- package/managers/method.manager.js.map +1 -0
- package/managers/queue-method.manager.js +2 -0
- package/managers/queue-method.manager.js.map +1 -0
- package/managers/subscription.manager.js +2 -0
- package/managers/subscription.manager.js.map +1 -0
- package/managers/support.manager.js +2 -0
- package/managers/support.manager.js.map +1 -0
- package/methods/accounts.js +2 -0
- package/methods/accounts.js.map +1 -0
- package/methods/aws.js +2 -0
- package/methods/aws.js.map +1 -0
- package/methods/cloudconvert.js +2 -0
- package/methods/cloudconvert.js.map +1 -0
- package/methods/collections.js +2 -0
- package/methods/collections.js.map +1 -0
- package/methods/counters.js +2 -0
- package/methods/counters.js.map +1 -0
- package/methods/cron-jobs.js +2 -0
- package/methods/cron-jobs.js.map +1 -0
- package/methods/flags.js +2 -0
- package/methods/flags.js.map +1 -0
- package/methods/logs.js +2 -0
- package/methods/logs.js.map +1 -0
- package/methods/pdf.js +2 -0
- package/methods/pdf.js.map +1 -0
- package/methods/report-builder.js +2 -0
- package/methods/report-builder.js.map +1 -0
- package/models/active-subscription.model.js +2 -0
- package/models/active-subscription.model.js.map +1 -0
- package/models/app-status.model.js +2 -0
- package/models/app-status.model.js.map +1 -0
- package/models/app-version.model.js +2 -0
- package/models/app-version.model.js.map +1 -0
- package/models/billing-logged-in-users.model.js +2 -0
- package/models/billing-logged-in-users.model.js.map +1 -0
- package/models/collection-document.model.js +2 -0
- package/models/collection-document.model.js.map +1 -0
- package/models/counter.model.js +2 -0
- package/models/counter.model.js.map +1 -0
- package/models/cron-job-history.model.js +2 -0
- package/models/cron-job-history.model.js.map +1 -0
- package/models/cron-job.model.js +2 -0
- package/models/cron-job.model.js.map +1 -0
- package/models/dialog.model.js +2 -0
- package/models/dialog.model.js.map +1 -0
- package/models/file.model.js +2 -0
- package/models/file.model.js.map +1 -0
- package/models/flag.model.js +2 -0
- package/models/flag.model.js.map +1 -0
- package/models/log-method-latency.model.js +2 -0
- package/models/log-method-latency.model.js.map +1 -0
- package/models/log-subscription.model.js +2 -0
- package/models/log-subscription.model.js.map +1 -0
- package/models/log.model.js +2 -0
- package/models/log.model.js.map +1 -0
- package/models/logged-in-users.model.js +2 -0
- package/models/logged-in-users.model.js.map +1 -0
- package/models/method-call.model.js +2 -0
- package/models/method-call.model.js.map +1 -0
- package/models/method-response.model.js +2 -0
- package/models/method-response.model.js.map +1 -0
- package/models/method.model.js +2 -0
- package/models/method.model.js.map +1 -0
- package/models/notification.model.js +2 -0
- package/models/notification.model.js.map +1 -0
- package/models/pagination.model.js +2 -0
- package/models/pagination.model.js.map +1 -0
- package/models/permission.model.js +2 -0
- package/models/permission.model.js.map +1 -0
- package/models/queue-method.model.js +2 -0
- package/models/queue-method.model.js.map +1 -0
- package/models/queue-response.model.js +2 -0
- package/models/queue-response.model.js.map +1 -0
- package/models/report-builder-report.model.js +2 -0
- package/models/report-builder-report.model.js.map +1 -0
- package/models/report-builder.model.js +2 -0
- package/models/report-builder.model.js.map +1 -0
- package/models/select-data-label.model.js +2 -0
- package/models/select-data-label.model.js.map +1 -0
- package/models/server-response.model.js +2 -0
- package/models/server-response.model.js.map +1 -0
- package/models/subscription.model.js +2 -0
- package/models/subscription.model.js.map +1 -0
- package/models/support-method.model.js +2 -0
- package/models/support-method.model.js.map +1 -0
- package/models/support-ticket.model.js +2 -0
- package/models/support-ticket.model.js.map +1 -0
- package/models/user.model.js +2 -0
- package/models/user.model.js.map +1 -0
- package/package.json +1 -1
- package/publications/app-status.js +2 -0
- package/publications/app-status.js.map +1 -0
- package/publications/app-version.js +2 -0
- package/publications/app-version.js.map +1 -0
- package/publications/billing-logged-in-users.js +2 -0
- package/publications/billing-logged-in-users.js.map +1 -0
- package/publications/cron-jobs.js +2 -0
- package/publications/cron-jobs.js.map +1 -0
- package/publications/files.js +2 -0
- package/publications/files.js.map +1 -0
- package/publications/flags.js +2 -0
- package/publications/flags.js.map +1 -0
- package/publications/logs.js +2 -0
- package/publications/logs.js.map +1 -0
- package/publications/method-calls.js +2 -0
- package/publications/method-calls.js.map +1 -0
- package/publications/method-responses.js +2 -0
- package/publications/method-responses.js.map +1 -0
- package/publications/notifications.js +2 -0
- package/publications/notifications.js.map +1 -0
- package/publications/report-builder-reports.js +2 -0
- package/publications/report-builder-reports.js.map +1 -0
- package/publications/super-admin.js +2 -0
- package/publications/super-admin.js.map +1 -0
- package/publications/support-tickets.js +2 -0
- package/publications/support-tickets.js.map +1 -0
- package/server-app.js +2 -0
- package/server-app.js.map +1 -0
- package/support-methods/aws.js +2 -0
- package/support-methods/aws.js.map +1 -0
- package/support-methods/collections.js +2 -0
- package/support-methods/collections.js.map +1 -0
- package/support-methods/counters.js +2 -0
- package/support-methods/counters.js.map +1 -0
- package/support-methods/support.js +2 -0
- package/support-methods/support.js.map +1 -0
- package/util/common.js +2 -0
- package/util/common.js.map +1 -0
- package/util/schema-report-builder.js +18 -0
- package/util/schema-report-builder.js.map +1 -0
package/client-server-app.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/client-server-app.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iBAMG;;AANH,iCAA0C;AAC1C,IAAI,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE9C,IAAI,uBAAe,CAAC,YAAY,EAAE,0BAA0B,EAAE,SAAS,CAAC,CAAC;AACzE,uBAAe,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC;;;;KAEpC,CAAC,CAAC","file":"client-server-app.js","sourcesContent":["import { ResolveIOServer } from './index';\nlet serverConfig = require('./settings.json');\n\nnew ResolveIOServer(serverConfig, 'ResolveIO Server Library', __dirname);\nResolveIOServer.connectAndRun().then(async () => {\n\t\n});"]}
|
|
@@ -66,3 +66,5 @@ var VersionSchema = new mongoose_1.Schema(schema, {
|
|
|
66
66
|
});
|
|
67
67
|
exports.ActiveSubscriptions['versionCollection'] = 'active-subscriptions.versions';
|
|
68
68
|
exports.ActiveSubscriptionVersions = index_1.ResolveIOServer.getMainDB().model(exports.ActiveSubscriptions['versionCollection'], VersionSchema);
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=active-subscription.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/active-subscription.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AAEnD,kCAA2C;AAE3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,KAAK;KACX;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,KAAK;KACX;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,mBAAmB,EAAE;QACpB,IAAI,EAAE,MAAM;KACZ;IACD,qBAAqB,EAAE;QACtB,IAAI,EAAE,MAAM;KACZ;IACD,qBAAqB,EAAE;QACtB,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAGU,QAAA,mBAAmB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;AAEnI,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,2BAAmB,CAAC,mBAAmB,CAAC,GAAG,+BAA+B,CAAC;AAE9D,QAAA,0BAA0B,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,2BAAmB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"active-subscription.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ActiveSubscriptionModel } from '../models/active-subscription.model';\nimport { ResolveIOServer } from '../index';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tpublication: { \n\t\ttype: String\n\t},\n\tsubData: {\n\t\ttype: String\n\t},\n\tcollections: {\n\t\ttype: Array\n\t},\n\t'collections.$': {\n\t\ttype: String\n\t},\n\tclients: {\n\t\ttype: Array\n\t},\n\t'clients.$': {\n\t\ttype: Object\n\t},\n\t'clients.$.id_user': {\n\t\ttype: String\n\t},\n\t'clients.$.messageId': {\n\t\ttype: Number\n\t},\n\t'clients.$.id_socket': {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends ActiveSubscriptionModel, Document {}\nexport const ActiveSubscriptions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('active-subscriptions', DefaultSchema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nActiveSubscriptions['versionCollection'] = 'active-subscriptions.versions';\n\nexport const ActiveSubscriptionVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(ActiveSubscriptions['versionCollection'], VersionSchema);"]}
|
|
@@ -41,3 +41,5 @@ var VersionSchema = new mongoose_1.Schema(schema, {
|
|
|
41
41
|
});
|
|
42
42
|
exports.AppStatus['versionCollection'] = 'app-statuses.versions';
|
|
43
43
|
exports.AppStatusVersions = index_1.ResolveIOServer.getMainDB().model(exports.AppStatus['versionCollection'], VersionSchema);
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=app-status.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/app-status.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAGU,QAAA,SAAS,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;AAEjH,iBAAS,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAEpD,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,iBAAS,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,CAAC;AAE5C,QAAA,iBAAiB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,iBAAS,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"app-status.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { AppStatusModel } from '../models/app-status.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tmessage: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends AppStatusModel, Document {}\nexport const AppStatus: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('app-statuses', DefaultSchema);\n\nAppStatus['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nAppStatus['versionCollection'] = 'app-statuses.versions';\n\nexport const AppStatusVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(AppStatus['versionCollection'], VersionSchema);"]}
|
|
@@ -54,3 +54,5 @@ exports.AppVersions['versionCollection'] = 'app-versions.versions';
|
|
|
54
54
|
exports.AppVersionVersions = index_1.ResolveIOServer.getMainDB().model(exports.AppVersions['versionCollection'], VersionSchema);
|
|
55
55
|
schema.version.type = simpl_schema_1.default.Integer;
|
|
56
56
|
exports.AppVersions['simplschema'] = new simpl_schema_1.default(schema);
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=app-version.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/app-version.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAGU,QAAA,WAAW,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;AAEnH,IAAI,WAAW,gBAAQ,MAAM,CAAE,CAAC;AAEhC,WAAW,CAAC,GAAG,GAAG;IACjB,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,WAAW,EAAE;IAC3C,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,mBAAW,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,CAAC;AAE9C,QAAA,kBAAkB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,mBAAW,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;AAE5I,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,sBAAY,CAAC,OAAO,CAAC;AAE3C,mBAAW,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC","file":"app-version.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { AppVersionModel } from '../models/app-version.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true \n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tversion: {\n\t\ttype: Number\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends AppVersionModel, Document {}\nexport const AppVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('app-versions', DefaultSchema);\n\nlet checkSchema = { ...schema };\n\ncheckSchema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(checkSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nAppVersions['versionCollection'] = 'app-versions.versions';\n\nexport const AppVersionVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(AppVersions['versionCollection'], VersionSchema);\n\nschema.version.type = SimpleSchema.Integer;\n\nAppVersions['simplschema'] = new SimpleSchema(schema);"]}
|
|
@@ -71,3 +71,5 @@ exports.BillingLoggedInUserVersions = null;
|
|
|
71
71
|
if (index_1.ResolveIOServer.getSupportDB()) {
|
|
72
72
|
index_1.ResolveIOServer.getMainDB().model(exports.BillingLoggedInUsers['versionCollection'], VersionSchema);
|
|
73
73
|
}
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=billing-logged-in-users.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/billing-logged-in-users.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,kCAA2C;AAE3C,6CAAwC;AAExC,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,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E,CAAC,KAAK,CAAC,4BAAoB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;CAC5F","file":"billing-logged-in-users.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { BillingLoggedInUserModel } from '../models/billing-logged-in-users.model';\nimport SimpleSchema from 'simpl-schema';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, id_user: 1, date: 1});\n\ninterface ResolveIOModel extends BillingLoggedInUserModel, Document {}\n\nexport let BillingLoggedInUsers: Model<ResolveIOModel> = null;\n\nif (ResolveIOServer.getSupportDB()) {\n\tBillingLoggedInUsers = ResolveIOServer.getSupportDB().model('billing-logged-in-users', DefaultSchema);\n\tBillingLoggedInUsers['simplschema'] = new SimpleSchema(schema);\n}\n\nlet vSchema = { ...schema };\nvSchema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(vSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nif (ResolveIOServer.getSupportDB()) {\n\tBillingLoggedInUsers['versionCollection'] = 'billing-logged-in-users.versions';\n}\n\nexport let BillingLoggedInUserVersions: Model<ResolveIOModel> = null;\n\nif (ResolveIOServer.getSupportDB()) {\n\tResolveIOServer.getMainDB().model(BillingLoggedInUsers['versionCollection'], VersionSchema);\n}"]}
|
|
@@ -0,0 +1 @@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CAAC;AAEH,gBAAQ,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAAC;AAEpD,IAAI,uBAAe,CAAC,YAAY,EAAE,EAAE;IACnC,uBAAe,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAAC;CAC3D;AAEY,QAAA,eAAe,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,gBAAQ,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;AAC3H,QAAA,sBAAsB,GAA0B,IAAI,CAAC;AAEhE,IAAI,uBAAe,CAAC,YAAY,EAAE,EAAE;IACnC,8BAAsB,GAAG,uBAAe,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,uBAAe,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;CACnH;AAED,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,sBAAY,CAAC,OAAO,CAAC;AACzC,gBAAQ,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAEnD,IAAI,uBAAe,CAAC,YAAY,EAAE,EAAE;IACnC,uBAAe,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;CAC1D","file":"counter.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { CounterModel } from '../models/counter.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true \n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tcount: {\n\t\ttype: Number\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends CounterModel, Document {}\nexport const Counters: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('counters', DefaultSchema);\nexport let SupportCounters: Model<ResolveIOModel> = null;\n\nif (ResolveIOServer.getSupportDB()) {\n\tSupportCounters = ResolveIOServer.getSupportDB().model('counters', DefaultSchema);\n}\n\nlet checkSchema = { ...schema };\n\ncheckSchema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(checkSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nCounters['versionCollection'] = 'counters.versions';\n\nif (ResolveIOServer.getSupportDB()) {\n\tSupportCounters['versionCollection'] = 'counters.versions';\n}\n\nexport const CounterVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(Counters['versionCollection'], VersionSchema);\nexport let SupportCounterVersions: Model<ResolveIOModel> = null;\n\nif (ResolveIOServer.getSupportDB()) {\n\tSupportCounterVersions = ResolveIOServer.getSupportDB().model(SupportCounters['versionCollection'], VersionSchema);\n}\n\nschema.count.type = SimpleSchema.Integer;\nCounters['simplschema'] = new SimpleSchema(schema);\n\nif (ResolveIOServer.getSupportDB()) {\n\tSupportCounters['simplschema'] = new SimpleSchema(schema);\n}"]}
|
|
@@ -84,3 +84,5 @@ var VersionSchema = new mongoose_1.Schema(vSchema, {
|
|
|
84
84
|
exports.CronJobHistory['versionCollection'] = 'cron-job-histories.versions';
|
|
85
85
|
exports.CronJobHistoryVersions = index_1.ResolveIOServer.getMainDB().model(exports.CronJobHistory['versionCollection'], VersionSchema);
|
|
86
86
|
exports.CronJobHistory['simplschema'] = new simpl_schema_1.default(schema);
|
|
87
|
+
|
|
88
|
+
//# sourceMappingURL=cron-job-history.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/cron-job-history.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;I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AAC5B,OAAO,CAAC,GAAG,GAAG;IACb,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,OAAO,EAAE;IACvC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,sBAAc,CAAC,mBAAmB,CAAC,GAAG,6BAA6B,CAAC;AAEvD,QAAA,sBAAsB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;AAEnJ,sBAAc,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC","file":"cron-job-history.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { CronJobModel } from '../models/cron-job.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tname: {\n\t\ttype: String\n\t},\n\treoccuring: {\n\t\ttype: Boolean\n\t},\n\ttime_to_run: {\n\t\ttype: String\n\t},\n\tmethod_name: {\n\t\ttype: String\n\t},\n\tlast_run: {\n\t\ttype: Date\n\t},\n\tnext_run: {\n\t\ttype: Date\n\t},\n\tid_cronjob: {\n\t\ttype: String\n\t},\n\tpassed: {\n\t\ttype: Boolean\n\t},\n\terror: {\n\t\ttype: String\n\t},\n\tstart_time: {\n\t\ttype: Date\n\t},\n\tend_time: {\n\t\ttype: Date\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 7});\n\ninterface ResolveIOModel extends CronJobModel, Document {}\nexport const CronJobHistory: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('cron-job-histories', DefaultSchema);\n\nlet vSchema = { ...schema };\nvSchema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(vSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nCronJobHistory['versionCollection'] = 'cron-job-histories.versions';\n\nexport const CronJobHistoryVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(CronJobHistory['versionCollection'], VersionSchema);\n\nCronJobHistory['simplschema'] = new SimpleSchema(schema); "]}
|
|
@@ -87,3 +87,5 @@ var VersionSchema = new mongoose_1.Schema(vSchema, {
|
|
|
87
87
|
exports.CronJobs['versionCollection'] = 'cron-jobs.versions';
|
|
88
88
|
exports.CronJobVersions = index_1.ResolveIOServer.getMainDB().model(exports.CronJobs['versionCollection'], VersionSchema);
|
|
89
89
|
exports.CronJobs['simplschema'] = new simpl_schema_1.default(schema);
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=cron-job.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/cron-job.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,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AAS,EAAE,CAAC,KAAK,CAAC,gBAAQ,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;AAEtI,gBAAQ,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC","file":"cron-job.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { CronJobModel } from '../models/cron-job.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tname: {\n\t\ttype: String\n\t},\n\trepeat: {\n\t\ttype: Boolean\n\t},\n\ttime_to_run: {\n\t\ttype: String\n\t},\n\tmethod_run: {\n\t\ttype: String\n\t},\n\tmethod_run_data: {\n\t\ttype: Object,\n\t\tblackbox: true,\n\t\toptional: true\n\t},\n\tmethod_complete: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tmethod_complete_data: {\n\t\ttype: Object,\n\t\tblackbox: true,\n\t\toptional: true\n\t},\n\trunning: {\n\t\ttype: Boolean\n\t},\n\ttimezone: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tnext_run: {\n\t\ttype: Date,\n\t\toptional: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends CronJobModel, Document {}\nexport const CronJobs: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('cron-jobs', DefaultSchema);\n\nlet vSchema = { ...schema };\nvSchema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(vSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nCronJobs['versionCollection'] = 'cron-jobs.versions';\n\nexport const CronJobVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(CronJobs['versionCollection'], VersionSchema);\n\nCronJobs['simplschema'] = new SimpleSchema(schema); \n"]}
|
|
@@ -76,3 +76,5 @@ if (index_1.ResolveIOServer.getSupportDB()) {
|
|
|
76
76
|
var rbLookups = [];
|
|
77
77
|
var rbSchema = Object.assign(schema, schema_report_builder_1.buildRbLookups(rbLookups, DefaultSchema, []));
|
|
78
78
|
exports.Files['rbSchema'] = schema_report_builder_1.buildRbSchema(rbSchema);
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=file.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/file.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,uEAA8E;AAE9E,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB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,aAAa,CAAC,CAAC;CACtG;AAED,qCAAqC;AACrC,IAAI,SAAS,GAAmB,EAAE,CAAC;AAEnC,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,sCAAc,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC;AACnF,aAAK,CAAC,UAAU,CAAC,GAAG,qCAAa,CAAC,QAAQ,CAAC,CAAC","file":"file.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { FileModel } from '../models/file.model';\nimport { LookupTables } from '../models/report-builder.model';\nimport { buildRbSchema, buildRbLookups } from '../util/schema-report-builder';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tname: {\n\t\ttype: String\n\t},\n\tsize: {\n\t\ttype: Number\n\t},\n\tkey: {\n\t\ttype: String\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\torder: {\n\t\ttype: Number\n\t},\n\tstatus: {\n\t\ttype: String,\n\t\toptional: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends FileModel, Document {}\nexport const Files: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('files', DefaultSchema);\nexport let SupportFiles: Model<ResolveIOModel> = null;\n\nif (ResolveIOServer.getSupportDB()) {\n\tSupportFiles = ResolveIOServer.getSupportDB().model('files', DefaultSchema);\n}\n\nFiles['simplschema'] = new SimpleSchema(schema);\n\nif (ResolveIOServer.getSupportDB()) {\n\tSupportFiles['simplschema'] = new SimpleSchema(schema);\n}\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nFiles['versionCollection'] = 'files.versions';\n\nif (ResolveIOServer.getSupportDB()) {\n\tSupportFiles['versionCollection'] = 'files.versions';\n}\n\nexport const FileVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(Files['versionCollection'], VersionSchema);\nexport let SupportFileVersions: Model<ResolveIOModel> = null;\n\nif (ResolveIOServer.getSupportDB()) {\n\tSupportFileVersions = ResolveIOServer.getSupportDB().model(Files['versionCollection'], VersionSchema);\n}\n\n//------------- Report Builder Schema\nlet rbLookups: LookupTables[] = [];\n\nlet rbSchema = Object.assign(schema, buildRbLookups(rbLookups, DefaultSchema, []));\nFiles['rbSchema'] = buildRbSchema(rbSchema);"]}
|
|
@@ -45,3 +45,5 @@ var VersionSchema = new mongoose_1.Schema(schema, {
|
|
|
45
45
|
});
|
|
46
46
|
exports.Flags['versionCollection'] = 'flags.versions';
|
|
47
47
|
exports.FlagVersions = index_1.ResolveIOServer.getMainDB().model(exports.Flags['versionCollection'], VersionSchema);
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=flag.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/flag.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAGU,QAAA,KAAK,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAEtG,aAAK,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAEhD,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAK,CAAC,mBAAmB,CAAC,GAAG,gBAAgB,CAAC;AAEjC,QAAA,YAAY,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,aAAK,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"flag.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { FlagModel } from '../models/flag.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tvalue: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends FlagModel, Document {}\nexport const Flags: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('flags', DefaultSchema);\n\nFlags['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nFlags['versionCollection'] = 'flags.versions';\n\nexport const FlagVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(Flags['versionCollection'], VersionSchema);\n"]}
|
|
@@ -52,3 +52,5 @@ var VersionSchema = new mongoose_1.Schema(schema, {
|
|
|
52
52
|
});
|
|
53
53
|
exports.LogMethodLatencies['versionCollection'] = 'log-method-latencies.versions';
|
|
54
54
|
exports.LogMethodLatencyVersions = index_1.ResolveIOServer.getMainDB().model(exports.LogMethodLatencies['versionCollection'], VersionSchema);
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=log-method-latency.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/log-method-latency.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,UAAU,EAAE;QACX,IAAI,EAAE,IAAI;KACV;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;AAC7E,aAAa,CAAC,KAAK,CAAC,EAAC,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;AACrC,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;AAGpB,QAAA,kBAAkB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;AAElI,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,0BAAkB,CAAC,mBAAmB,CAAC,GAAG,+BAA+B,CAAC;AAE7D,QAAA,wBAAwB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,0BAAkB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"log-method-latency.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LogMethodLatencyModel } from '../models/log-method-latency.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate_start: {\n\t\ttype: Date\n\t},\n\tdate_end: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tlatency_ms: {\n\t\ttype: Number\n\t},\n\tmethod: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({latency_ms: 1});\nDefaultSchema.index({method: 1});\n\ninterface ResolveIOModel extends LogMethodLatencyModel, Document {}\nexport const LogMethodLatencies: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('log-method-latencies', DefaultSchema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nLogMethodLatencies['versionCollection'] = 'log-method-latencies.versions';\n\nexport const LogMethodLatencyVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(LogMethodLatencies['versionCollection'], VersionSchema);"]}
|
|
@@ -60,3 +60,5 @@ var VersionSchema = new mongoose_1.Schema(schema, {
|
|
|
60
60
|
});
|
|
61
61
|
exports.LogSubscriptions['versionCollection'] = 'log-subscriptions.versions';
|
|
62
62
|
exports.LogSubscriptionVersions = index_1.ResolveIOServer.getMainDB().model(exports.LogSubscriptions['versionCollection'], VersionSchema);
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=log-subscription.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/log-subscription.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAA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AAC,CAAC;AAE7H,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,wBAAgB,CAAC,mBAAmB,CAAC,GAAG,4BAA4B,CAAC;AAExD,QAAA,uBAAuB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,wBAAgB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"log-subscription.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LogSubscriptionModel } from '../models/log-subscription.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tsubscription: {\n\t\ttype: String\n\t},\n\tcollection_name: {\n\t\ttype: String\n\t},\n\tsubData: {\n\t\ttype: Array\t\n\t},\n\t'subData.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({type: 1});\nDefaultSchema.index({collection_name: 1});\nDefaultSchema.index({date: 1, type: 1});\nDefaultSchema.index({createdAt: 1});\n\ninterface ResolveIOModel extends LogSubscriptionModel, Document {}\nexport const LogSubscriptions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('log-subscriptions', DefaultSchema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nLogSubscriptions['versionCollection'] = 'log-subscriptions.versions';\n\nexport const LogSubscriptionVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(LogSubscriptions['versionCollection'], VersionSchema);"]}
|
|
@@ -65,3 +65,5 @@ var VersionSchema = new mongoose_1.Schema(schema, {
|
|
|
65
65
|
});
|
|
66
66
|
exports.Logs['versionCollection'] = 'logs.versions';
|
|
67
67
|
exports.LogVersions = index_1.ResolveIOServer.getMainDB().model(exports.Logs['versionCollection'], VersionSchema);
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=log.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/log.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAA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C,EAAE,aAAa,CAAC,CAAC","file":"log.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LogModel } from '../models/log.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\ttitle: {\n\t\ttype: String\n\t},\n\tmessage: {\n\t\ttype: String\n\t},\n\tpayload: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({type: 1});\nDefaultSchema.index({type: 1, date: 1});\nDefaultSchema.index({user: 1, date: 1});\nDefaultSchema.index({user: 1, type: 1, date: 1});\n\ninterface ResolveIOModel extends LogModel, Document {}\nexport const Logs: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('logs', DefaultSchema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nLogs['versionCollection'] = 'logs.versions';\n\nexport const LogVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(Logs['versionCollection'], VersionSchema);"]}
|
|
@@ -69,3 +69,5 @@ var VersionSchema = new mongoose_1.Schema(vSchema, {
|
|
|
69
69
|
});
|
|
70
70
|
exports.LoggedInUsers['versionCollection'] = 'logged-in-users.versions';
|
|
71
71
|
exports.LoggedInUserVersions = index_1.ResolveIOServer.getMainDB().model(exports.LoggedInUsers['versionCollection'], VersionSchema);
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=logged-in-users.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/logged-in-users.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,KAAK,EAAE,CAAC,EAAC,CAAC,CAAC;AAGnB,QAAA,aAAa,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;AAExH,IAAI,OAAO,gBAAQ,MAAM,CAAE,CAAC;AAC5B,OAAO,CAAC,GAAG,GAAG;IACb,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,OAAO,EAAE;IACvC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,qBAAa,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,CAAC;AAEnD,QAAA,oBAAoB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,qBAAa,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"logged-in-users.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LoggedInUserModel } from '../models/logged-in-users.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tapp_version: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tlatency: {\n\t\ttype: Number,\n\t\toptional: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({id_ws: 1});\n\ninterface ResolveIOModel extends LoggedInUserModel, Document {}\nexport const LoggedInUsers: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('logged-in-users', DefaultSchema);\n\nlet vSchema = { ...schema };\nvSchema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(vSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nLoggedInUsers['versionCollection'] = 'logged-in-users.versions';\n\nexport const LoggedInUserVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(LoggedInUsers['versionCollection'], VersionSchema);"]}
|
|
@@ -42,3 +42,5 @@ DefaultSchema.index({ id_user: 1, message_id: 1 });
|
|
|
42
42
|
DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 86400 });
|
|
43
43
|
exports.MethodCalls = index_1.ResolveIOServer.getMainDB().model('method-calls', DefaultSchema);
|
|
44
44
|
exports.MethodCalls['simplschema'] = new simpl_schema_1.default(schema);
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=method-call.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/method-call.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;AACjD,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;AAGpD,QAAA,WAAW,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;AAEnH,mBAAW,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC","file":"method-call.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MethodCallModel } from '../models/method-call.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({id_user: 1, message_id: 1});\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 86400});\n\ninterface ResolveIOModel extends MethodCallModel, Document {}\nexport const MethodCalls: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('method-calls', DefaultSchema);\n\nMethodCalls['simplschema'] = new SimpleSchema(schema);"]}
|
|
@@ -46,3 +46,5 @@ DefaultSchema.index({ id_user: 1, message_id: 1 });
|
|
|
46
46
|
DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 86400 });
|
|
47
47
|
exports.MethodResponses = index_1.ResolveIOServer.getMainDB().model('method-responses', DefaultSchema);
|
|
48
48
|
exports.MethodResponses['simplschema'] = new simpl_schema_1.default(schema);
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=method-response.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/method-response.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;AACjD,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;AAGpD,QAAA,eAAe,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;AAE3H,uBAAe,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC","file":"method-response.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MethodResponseModel } from '../models/method-response.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tresponse: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({id_user: 1, message_id: 1});\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 86400});\n\ninterface ResolveIOModel extends MethodResponseModel, Document {}\nexport const MethodResponses: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('method-responses', DefaultSchema);\n\nMethodResponses['simplschema'] = new SimpleSchema(schema);"]}
|
|
@@ -41,3 +41,5 @@ var VersionSchema = new mongoose_1.Schema(schema, {
|
|
|
41
41
|
});
|
|
42
42
|
exports.Notifications['versionCollection'] = 'notifications.versions';
|
|
43
43
|
exports.NotificationVersions = index_1.ResolveIOServer.getMainDB().model(exports.Notifications['versionCollection'], VersionSchema);
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=notification.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/notification.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AAExC,kCAA2C;AAE3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAGU,QAAA,aAAa,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAEtH,qBAAa,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,qBAAa,CAAC,mBAAmB,CAAC,GAAG,wBAAwB,CAAC;AAEjD,QAAA,oBAAoB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,qBAAa,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"notification.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { NotificationModel } from '../models/notification.model';\nimport { ResolveIOServer } from '../index';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tname: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends NotificationModel, Document {}\nexport const Notifications: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('notifications', DefaultSchema);\n\nNotifications['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nNotifications['versionCollection'] = 'notifications.versions';\n\nexport const NotificationVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(Notifications['versionCollection'], VersionSchema);"]}
|
|
@@ -39,3 +39,5 @@ var VersionSchema = new mongoose_1.Schema(schema, {
|
|
|
39
39
|
});
|
|
40
40
|
exports.QueueFlags['versionCollection'] = 'queue-flags.versions';
|
|
41
41
|
exports.QueueFlagVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueFlags['versionCollection'], VersionSchema);
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=queue-flag.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/queue-flag.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,EAAC,CAAC,CAAC;AAGjD,QAAA,UAAU,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;AAEjH,kBAAU,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,kBAAU,CAAC,mBAAmB,CAAC,GAAG,sBAAsB,CAAC;AAE5C,QAAA,iBAAiB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,kBAAU,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"queue-flag.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { CollectionDocument } from '../models/collection-document.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 60});\n\ninterface ResolveIOModel extends CollectionDocument, Document {}\nexport const QueueFlags: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('queue-flags', DefaultSchema);\n\nQueueFlags['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nQueueFlags['versionCollection'] = 'queue-flags.versions';\n\nexport const QueueFlagVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(QueueFlags['versionCollection'], VersionSchema);"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/queue-method.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,cAAc,GAAQ;IACzB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,KAAK;KACX;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;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Q,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,KAAK;KACX;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,SAAS,EAAE;QACV,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,oBAAY,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,WAAW,CAAC,CAAC","file":"queue-method.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { QueueMethodModel } from '../models/queue-method.model';\n\nlet mongooseSchema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true \n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tmethod_data: {\n\t\ttype: Array\n\t},\n\t'method_data.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tid_methodLatency: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(mongooseSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true,\n\tminimize: false\n});\n\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60});\n\ninterface ResolveIOModel extends QueueMethodModel, Document {}\nexport const QueueMethods: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('queue-methods', DefaultSchema); \n\nlet vSchema = { ...mongooseSchema };\nvSchema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(vSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true,\n\tminimize: false\n});\n\nQueueMethods['versionCollection'] = 'queue-methods.versions';\n\nexport const QueueMethodVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(QueueMethods['versionCollection'], VersionSchema);\n\nlet simplSchema = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true \n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tmethod_data: {\n\t\ttype: Array\n\t},\n\t'method_data.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t}\n};\n\nQueueMethods['simplschema'] = new SimpleSchema(simplSchema);"]}
|
|
@@ -73,3 +73,5 @@ var VersionSchema = new mongoose_1.Schema(vSchema, {
|
|
|
73
73
|
exports.QueueResponses['versionCollection'] = 'queue-responses.versions';
|
|
74
74
|
exports.QueueResponseVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueResponses['versionCollection'], VersionSchema);
|
|
75
75
|
exports.QueueResponses['simplschema'] = new simpl_schema_1.default(schema);
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=queue-response.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/queue-response.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,SAAS,EAAE;QACV,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,EAAC,CAAC,CAAC;AAG5C,QAAA,cAAc,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;AAEzH,IAAI,OAAO,gBAAQ,MAAM,CAAE,CAAC;AAC5B,OAAO,CAAC,GAAG,GAAG;IACb,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,OAAO,EAAE;IACvC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,sBAAc,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,CAAC;AAEpD,QAAA,qBAAqB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;AAElJ,sBAAc,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC","file":"queue-response.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { QueueResponseModel } from '../models/queue-response.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true \n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tresponse: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60});\n\ninterface ResolveIOModel extends QueueResponseModel, Document {}\nexport const QueueResponses: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('queue-responses', DefaultSchema); \n\nlet vSchema = { ...schema };\nvSchema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(vSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nQueueResponses['versionCollection'] = 'queue-responses.versions';\n\nexport const QueueResponseVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(QueueResponses['versionCollection'], VersionSchema);\n\nQueueResponses['simplschema'] = new SimpleSchema(schema);"]}
|
|
@@ -142,3 +142,5 @@ var VersionSchema = new mongoose_1.Schema(vSchema, {
|
|
|
142
142
|
exports.ReportBuilderReports['versionCollection'] = 'report-builder-reports.versions';
|
|
143
143
|
exports.ReportBuilderReportVersions = index_1.ResolveIOServer.getMainDB().model(exports.ReportBuilderReports['versionCollection'], VersionSchema);
|
|
144
144
|
exports.ReportBuilderReports['simplschema'] = new simpl_schema_1.default(schema);
|
|
145
|
+
|
|
146
|
+
//# sourceMappingURL=report-builder-report.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/report-builder-report.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;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 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { ReportBuilderReportModel } from '../models/report-builder-report.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcollection_root: {\n\t\ttype: String\n\t},\n\treport_name: {\n\t\ttype: String\n\t},\n\tfields_sort: {\n\t\ttype: Array\n\t},\n\t'fields_sort.$': {\n\t\ttype: Object\n\t},\n\t'fields_sort.$.field': {\n\t\ttype: String\n\t},\n\t'fields_sort.$.order': {\n\t\ttype: String\n\t},\n\tfields_filter: {\n\t\ttype: Array\n\t},\n\t'fields_filter.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_selected: {\n\t\ttype: Array\n\t},\n\t'fields_selected.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_total: {\n\t\ttype: Array\n\t},\n\t'fields_total.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_link: {\n\t\ttype: Array\n\t},\n\t'fields_link.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tdate_created: {\n\t\ttype: Date\n\t},\n\tshared_users: {\n\t\ttype: Array\n\t},\n\t'shared_users.$': {\n\t\ttype: String\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tgroups_row: {\n\t\ttype: Array\n\t},\n\t'groups_row.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tgroups_column: {\n\t\ttype: Array\n\t},\n\t'groups_column.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tgroup_type: {\n\t\ttype: String\n\t},\n\tid_date_field: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tdate_interval: {\n\t\ttype: String,\n\t\toptional: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({id_user: 1});\nDefaultSchema.index({shared_users: 1});\nDefaultSchema.index({report_name: 1, collection_root: 1});\n\ninterface ResolveIOModel extends ReportBuilderReportModel, Document {}\nexport const ReportBuilderReports: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('report-builder-reports', DefaultSchema);\n\nlet vSchema = { ...schema };\nvSchema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(vSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nReportBuilderReports['versionCollection'] = 'report-builder-reports.versions';\n\nexport const ReportBuilderReportVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(ReportBuilderReports['versionCollection'], VersionSchema);\n\nReportBuilderReports['simplschema'] = new SimpleSchema(schema);"]}
|
|
@@ -219,3 +219,5 @@ exports.SupportTicketVersions = null;
|
|
|
219
219
|
if (index_1.ResolveIOServer.getSupportDB()) {
|
|
220
220
|
exports.SupportTicketVersions = index_1.ResolveIOServer.getSupportDB().model(exports.SupportTickets['versionCollection'], VersionSchema);
|
|
221
221
|
}
|
|
222
|
+
|
|
223
|
+
//# sourceMappingURL=support-ticket.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/support-ticket.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EA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AG,uBAAe,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;CACjH","file":"support-ticket.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { SupportTicketModel } from '../models/support-ticket.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tpriority: {\n\t\ttype: String\n\t},\n\tissue: {\n\t\ttype: String\n\t},\n\tsupport_ticket_number: {\n\t\ttype: Number\n\t},\n\tsupport_ticket_number_string: {\n\t\ttype: String\n\t},\n\tstatus: {\n\t\ttype: String\n\t},\n\tsubstatus: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tid_client: {\n\t\ttype: String\n\t},\n\tmessages: {\n\t\ttype: Array\n\t},\n\t'messages.$': {\n\t\ttype: Object\n\t},\n\t'messages.$.message': {\n\t\ttype: String\n\t},\n\t'messages.$.id_user': {\n\t\ttype: String\n\t},\n\t'messages.$.user': {\n\t\ttype: String\n\t},\n\t'messages.$.date': {\n\t\ttype: Date\n\t},\n\t'messages.$.type': {\n\t\ttype: String\n\t},\n\tdate_created: {\n\t\ttype: Date\n\t},\n\tdate_created_string: {\n\t\ttype: String\n\t},\n\tid_user_created: {\n\t\ttype: String\n\t},\n\tuser_created: {\n\t\ttype: String\n\t},\n\tbillable: {\n\t\ttype: Boolean\n\t},\n\tdate_investigation: {\n\t\ttype: Date,\n\t\toptional: true,\n\t},\n\tdate_closed: {\n\t\ttype: Date,\n\t\toptional: true,\n\t},\n\tfiles: {\n\t\ttype: Array\n\t},\n\t'files.$': {\n\t\ttype: String\n\t},\n\tcurrent_watchers: {\n\t\ttype: Array\n\t},\n\t'current_watchers.$': {\n\t\ttype: Object\n\t},\t\n\t'current_watchers.$.user': {\n\t\ttype: String\n\t},\t\n\t'current_watchers.$.id_user': {\n\t\ttype: String\n\t},\t\n\t'current_watchers.$.email': {\n\t\ttype: String\n\t},\n\tclient_user: {\n\t\ttype: Object\n\t},\n\t'client_user.id_user': {\n\t\ttype: String\n\t},\n\t'client_user.user': {\n\t\ttype: String\n\t},\n\t'client_user.email': {\n\t\ttype: String\n\t},\n\tusers_assigned: {\n\t\ttype: Array\n\t},\n\t'users_assigned.$': {\n\t\ttype: Object\n\t},\n\t'users_assigned.$.id_user': {\n\t\ttype: String\n\t},\n\t'users_assigned.$.user': {\n\t\ttype: String\n\t},\t\n\t'users_assigned.$.date_created': {\n\t\ttype: Date\n\t},\n\testimated_billable_hours: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tbillable_hours: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tbill_description: {\n\t\ttype: String\n\t},\n\ttasks: {\n\t\ttype: Array\n\t},\n\t'tasks.$': {\n\t\ttype: Object\n\t},\n\t'tasks.$.description': {\n\t\ttype: String\n\t},\n\t'tasks.$.completed': {\n\t\ttype: Boolean\n\t},\t\n\t'tasks.$.id_user': {\n\t\ttype: String,\n\t},\t\n\t'tasks.$.user': {\n\t\ttype: String,\n\t},\t\n\t'tasks.$.date_created': {\n\t\ttype: Date\n\t},\t\n\t'tasks.$.date_completed': {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tnotes: {\n\t\ttype: Array\n\t},\n\t'notes.$': {\n\t\ttype: Object\n\t},\n\t'notes.$.description': {\n\t\ttype: String\n\t},\n\t'notes.$.id_user': {\n\t\ttype: String,\n\t},\t\n\t'notes.$.user': {\n\t\ttype: String,\n\t},\n\t'notes.$.date_created': {\n\t\ttype: Date\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends SupportTicketModel, Document {}\n\nexport let SupportTickets: Model<ResolveIOModel> = null;\n\nif (ResolveIOServer.getSupportDB()) {\n\tSupportTickets = ResolveIOServer.getSupportDB().model('support-tickets', DefaultSchema);\n\tSupportTickets['simplschema'] = new SimpleSchema(schema);\n}\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nif (ResolveIOServer.getSupportDB()) {\n\tSupportTickets['versionCollection'] = 'support-tickets.versions';\n}\n\nexport let SupportTicketVersions: Model<ResolveIOModel> = null;\n\nif (ResolveIOServer.getSupportDB()) {\n\tSupportTicketVersions = ResolveIOServer.getSupportDB().model(SupportTickets['versionCollection'], VersionSchema);\n}"]}
|
|
@@ -186,3 +186,5 @@ exports.UserVersions = index_1.ResolveIOServer.getMainDB().model(exports.Users['
|
|
|
186
186
|
var rbLookups = [];
|
|
187
187
|
var rbSchema = Object.assign(schema, schema_report_builder_1.buildRbLookups(rbLookups, DefaultSchema, []));
|
|
188
188
|
exports.Users['rbSchema'] = schema_report_builder_1.buildRbSchema(rbSchema);
|
|
189
|
+
|
|
190
|
+
//# sourceMappingURL=user.collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/collections/user.collection.ts"],"names":[],"mappings":";;AAAA,qCAAwG;AACxG,+DAAiE;AACjE,6CAAwC;AACxC,kCAA2C;AAG3C,uEAA8E;AAE9E,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAA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file":"user.collection.js","sourcesContent":["import { Schema, Model, PassportLocalDocument, PassportLocalModel, PassportLocalSchema} from 'mongoose';\nimport * as passportLocalMongoose from 'passport-local-mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { UserModel } from '../models/user.model';\nimport { LookupTables } from '../models/report-builder.model';\nimport { buildRbSchema, buildRbLookups } from '../util/schema-report-builder';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\treadonly: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t},\n\tactive: {\n\t\ttype: Boolean\n\t},\n\tattempts: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tlast: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tservices: {\n\t\ttype: Object,\n\t\toptional: true\n\t},\n\t'services.enrollment': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'services.forgot_password': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'services.reset_password': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tusername: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\temail: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tfullname: {\n\t\ttype: String\n\t},\n\troles: {\n\t\ttype: Array\n\t},\n\t'roles.$': {\n\t\ttype: String\n\t},\n\tphonenumber: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tother: {\n\t\ttype: Object,\n\t\tblackbox: true,\n\t\toptional: true\n\t},\n\tassets: {\n\t\ttype: Array,\n\t\toptional: true\n\t},\n\t'assets.$': {\n\t\ttype: Object\n\t},\n\t'assets.$.type': {\n\t\ttype: String\n\t},\n\t'assets.$.id_asset': {\n\t\ttype: String\n\t},\n\t'assets.$.asset_number': {\n\t\ttype: String\n\t},\n\t'assets.$.ownership': {\n\t\ttype: String\n\t},\n\t'assets.$.ownership_driver': {\n\t\ttype: String\n\t},\n\t'assets.$.date_start': {\n\t\ttype: Date\n\t},\n\t'assets.$.date_end': {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tid_function: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tcustomers: {\n\t\ttype: Array,\n\t\toptional: true,\n\t},\n\t'customers.$': {\n\t\ttype: Object\n\t},\n\t'customers.$.id_customer': {\n\t\ttype: String\n\t},\n\t'customers.$.customer': {\n\t\ttype: String\n\t},\n\tid_customer: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tcustomer: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tcustomer_type: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tdepartments: {\n\t\ttype: Array,\n\t\toptional: true\n\t},\n\t'departments.$': {\n\t\ttype: Object\n\t},\n\t'departments.$.id_department': {\n\t\ttype: String\n\t},\n\t'departments.$.department': {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = <PassportLocalSchema>new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.plugin(passportLocalMongoose, {\n\tusernameUnique: true,\n\tlimitAttempts: true,\n\tmaxAttempts: 5,\n\tfindByUsername: (mongooseModel, queryParameters) => {\n\t\t// Add additional query parameter - AND condition - active: true\n\t\tqueryParameters.active = true;\n\t\treturn mongooseModel.findOne(queryParameters);\n\t}\n});\n\ninterface ResolveIOModel extends UserModel, PassportLocalDocument {}\nexport const Users: PassportLocalModel<ResolveIOModel> = ResolveIOServer.getMainDB().model('users', DefaultSchema);\n\nexport let ClientUsers: PassportLocalModel<ResolveIOModel> = null;\n\nif (ResolveIOServer.getSupportDB()) {\n\tClientUsers = ResolveIOServer.getSupportDB().model('client-users', DefaultSchema);\n}\n\nUsers['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nUsers['versionCollection'] = 'users.versions';\n\nexport const UserVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(Users['versionCollection'], VersionSchema);\n\n//------------- Report Builder Schema\nlet rbLookups: LookupTables[] = [];\n\nlet rbSchema = Object.assign(schema, buildRbLookups(rbLookups, DefaultSchema, []));\nUsers['rbSchema'] = buildRbSchema(rbSchema);"]}
|
package/cron/cron.js
CHANGED
package/cron/cron.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/cron/cron.ts"],"names":[],"mappings":"AAAA,IAAI,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;AAEtC,SAAS,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO;IAC9C,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;IACf,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,EAAE;QACvB,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;KAClC;AAEF,CAAC;AAED,cAAc,CAAC,SAAS,CAAC,MAAM,GAAG,UAAS,GAAG;IAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,cAAc,CAAC,SAAS,CAAC,OAAO,GAAG;IAClC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,cAAc,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO;IAC9D,IAAI,CAAC,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,YAAY,IAAI,CAAC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,IAAI,YAAY,QAAQ,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H;KACD;IACD,OAAO,MAAM,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,yBAAuB,GAAG,WAAM,MAAM,CAAC,OAAS,CAAC,CAAC;KAChE;AACF,CAAC;AAED,SAAS,UAAU,CAAC,GAAG,EAAE,IAAI;IAC5B,IAAI;QACH,IAAI,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAEtB,IAAI,CAAC,CAAC,IAAI,YAAY,QAAQ,CAAC,EAAE;YAChC,OAAO,CAAC,KAAK,CAAC,yDAAuD,OAAM,CAAC,IAAI,CAAG,CAAC,CAAC;YACrF,OAAO;SACP;QAED,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;KAG7H;IACD,OAAO,MAAM,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,0BAAwB,GAAG,YAAO,MAAM,CAAC,OAAS,CAAC,CAAC;KAClE;AACF,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,cAAc,CAAC","file":"cron.js","sourcesContent":["let CronJob = require('cron').CronJob;\n\nfunction CrontabManager(key, tab, task, options) {\n\tthis.jobs = {};\n\tif (key && tab && task) {\n\t\tthis.add(key, tab, task, options);\n\t}\n\n}\n\nCrontabManager.prototype.getJob = function(key) {\n\treturn this.jobs[key];\n};\n\nCrontabManager.prototype.getJobs = function() {\n\treturn Object.keys(this.jobs);\n};\n\nCrontabManager.prototype.add = function(key, tab, task, options) {\n\tif ((typeof tab === 'string' || tab instanceof Date) && typeof key === 'string' && task instanceof Function) {\n\t\toptions = combineOptions(tab, task, options);\n\t\ttry {\n\t\t\tif (this.jobs[key]) {\n\t\t\t\tthis.deleteJob(key);\n\t\t\t\tconsole.warn(`${key} already existed and was deleted from the manager...`);\n\t\t\t}\n\t\t\t\n\t\t\tthis.jobs[key] = new CronJob(options);\n\t\t} \n\t\tcatch (fooBaredByUser) {\n\t\t\tconsole.error(`crontab: ${tab} possibly not valid, job ${key} not started...${fooBaredByUser.message}`);\n\t\t}\n\t}\n\telse {\n\t\tconsole.warn(`couldn't add: ${key} improper arguments`);\n\t}\n};\n\nCrontabManager.prototype.update = function() {\n\tif (arguments.length === 2) {\n\t\tif (typeof arguments[1] === 'string' || arguments[1] instanceof Date) {\n\t\t\tupdateTab.call(this, arguments[0], arguments[1]);\n\t\t}\n\t\telse if (arguments[1] instanceof Function) {\n\t\t\tupdateTask.call(this, arguments[0], arguments[1]);\n\t\t}\n\t} \n\telse if (arguments.length === 3) {\n\t\tupdateTab.call(this, arguments[0], arguments[1]);\n\t\tupdateTask.call(this, arguments[0], arguments[2]);\n\t}\n\telse {\n\t\tconsole.error(`incorrect number of arguents passed to update.. won't update.. ${arguments[0]}`);\n\t}\n};\n\nCrontabManager.prototype.deleteJob = function(key) {\n\ttry {\n\t\tthis.jobs[key].stop();\n\t\tdelete this.jobs[key];\n\t}\n\tcatch (err) { \n\t\tconsole.error(`error in trying to stop job: ${key}: ${err}`);\n\t}\n};\n\nCrontabManager.prototype.start = function(key) {\n\ttry {\n\t\tif (this.jobs[key].running) {\n\t\t\tconsole.warn(`${key} job already running`);\n\t\t}\n\t\telse {\n\t\t\tthis.jobs[key].start();\n\t\t}\n\t}\n\tcatch (err) {\n\t\tconsole.error(`couldn't start job: ${key}: ${err}`);\n\t}\n};\n\nCrontabManager.prototype.stop = function(key) {\n\ttry {\n\t\tif (! this.jobs[key].running ) {\n\t\t\tconsole.warn(`${key} job already stopped`);\n\t\t}\n\t\telse {\n\t\t\tthis.jobs[key].stop();\n\t\t}\n\t}\n\tcatch (err) {\n\t\tconsole.error(`couldn't stop job: ${key}: ${err}`);\n\t}\n};\n\nCrontabManager.prototype.stopAll = function() {\n\t// tslint:disable-next-line:forin\n\tfor (let jobKey in this.jobs) {\n\t\ttry {\n\t\t\tthis.jobs[jobKey].stop();\n\t\t}\n\t\tcatch (err) {\n\n\t\t}\n\t}\n};\n\nCrontabManager.prototype.toString = function() {\n\tlet manString = '{\\n';\n\t// tslint:disable-next-line:forin\n\tfor (let jobKey in this.jobs) {\n\n\t\tmanString += `'${jobKey}': ${this.jobs[jobKey].cronTime.source}: ${this.jobs[jobKey]._callbacks[0]}: ${this.jobs[jobKey].running ? 'Running' : 'Stopped'}`;\n\t}\n\tmanString += '\\n}';\n\treturn manString;\n};\n\nCrontabManager.prototype.listCrons = function() {\n\tlet manString = '{\\n';\n\t// tslint:disable-next-line:forin\n\tfor (let jobKey in this.jobs) {\n\t\tmanString += `'${jobKey}': ${this.jobs[jobKey].cronTime.source} status: ${this.jobs[jobKey].running ? 'Running' : 'Stopped'} \\n`;\n\t}\n\tmanString += '\\n}';\n\treturn manString;\n};\n\nCrontabManager.prototype.exists = function(tabKey) {\n\tif (this.jobs[tabKey]) {\n\t\treturn true;\n\t}\n\n\treturn false;\n};\n\nfunction combineOptions(tab, task, options) {\n\tlet newOpts = {};\n\tnewOpts['cronTime'] = tab; \n\tnewOpts['onTick'] = task;\n\n\tif (options instanceof Object) {\n\t\t// might overwrite... please be careful.\n\t\t// tslint:disable-next-line:forin\n\t\tfor (let optionKey in options) {\n\t\t\tnewOpts[optionKey] = options[optionKey];\n\t\t}\n\t}\n\treturn newOpts;\n}\n\nfunction updateTab(key, cronstring) {\n\n\ttry {\n\t\tlet running = this.jobs[key].running;\n\t\tthis.jobs[key].stop();\n\n\t\tif (typeof cronstring === 'string' || cronstring instanceof Date) {\n\t\t\tthis.jobs[key] = new CronJob(cronstring, this.jobs[key]._callbacks[0], this.jobs[key].onComplete, running, this.jobs[key].zone);\n\t\t}\n\t\telse {\n\t\t\tthrow new Error(`The cron definition passed was not a string or a Date object! ${key} was stopped and not updated`);\n\t\t}\n\t}\n\tcatch (tabErr) {\n\t\tconsole.error(`error updating tab: ${key} - ${tabErr.message}`);\n\t}\n}\n\nfunction updateTask(key, task) {\n\ttry {\n\t\tlet running = this.jobs[key].running;\n\t\tthis.jobs[key].stop();\n\n\t\tif (!(task instanceof Function)) {\n\t\t\tconsole.error(`can't update with something that is not a function: ${typeof(task)}`);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.jobs[key] = new CronJob(this.jobs[key].cronTime.source, task, this.jobs[key].onComplete, running, this.jobs[key].zone);\n\n\n\t} \n\tcatch (tabErr) {\n\t\tconsole.error(`error updating task: ${key} - ${tabErr.message}`);\n\t}\n}\n\nmodule.exports = CrontabManager;\n"]}
|
package/fixtures/cron-jobs.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/fixtures/cron-jobs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0EAA8D;AAC9D,qCAAiC;AAEjC,SAAsB,kBAAkB;;;;;wBAExB,qBAAM,8BAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,EAAA;;oBAAzC,QAAQ,GAAG,SAA8B;yBAEzC,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,IAAI,KAAK,cAAc,EAAzB,CAAyB,CAAC,CAAC,MAAM,EAAvD,wBAAuD;oBAC1D,qBAAM,8BAAQ,CAAC,MAAM,CACpB;4BACC,GAAG,EAAE,gBAAK,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE;4BACnC,GAAG,EAAE,CAAC;4BACN,IAAI,EAAE,cAAc;4BACpB,QAAQ,EAAG,IAAI;4BACf,UAAU,EAAE,IAAI;4BAChB,aAAa,EAAG,eAAe;4BAC/B,YAAY,EAAG,aAAa;4BAC5B,iBAAiB,EAAG,IAAI;4BACxB,UAAU,EAAG,IAAI,IAAI,EAAE;4BACvB,SAAS,EAAG,KAAK;yBACjB,CACD,EAAA;;oBAbD,SAaC,CAAC;;;yBAGC,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,IAAI,KAAK,qBAAqB,EAAhC,CAAgC,CAAC,CAAC,MAAM,EAA9D,wBAA8D;oBACjE,qBAAM,8BAAQ,CAAC,MAAM,CACpB;4BACC,GAAG,EAAE,gBAAK,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE;4BACnC,GAAG,EAAE,CAAC;4BACN,IAAI,EAAE,qBAAqB;4BAC3B,QAAQ,EAAG,IAAI;4BACf,UAAU,EAAE,IAAI;4BAChB,aAAa,EAAG,aAAa;4BAC7B,YAAY,EAAG,mBAAmB;4BAClC,iBAAiB,EAAG,IAAI;4BACxB,UAAU,EAAG,IAAI,IAAI,EAAE;4BACvB,SAAS,EAAG,KAAK;yBACjB,CACD,EAAA;;oBAbD,SAaC,CAAC;;;oBAGH,QAAQ,CAAC,MAAM,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,EAAxE,CAAwE,CAAC,CAAC,OAAO,CAAC,UAAA,OAAO;wBAC7G,8BAAQ,CAAC,SAAS,CAAC,EAAC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAC,EAAE,EAAC,IAAI,EAAE,EAAC,OAAO,EAAE,KAAK,EAAC,EAAC,CAAC,CAAC,IAAI,EAAE,CAAC;oBACzE,CAAC,CAAC,CAAC;;;;;CACH;AAzCD,gDAyCC","file":"cron-jobs.js","sourcesContent":["import { CronJobs } from '../collections/cron-job.collection';\nimport { Types } from 'mongoose';\n\nexport async function loadServerCronJobs() {\n\n\tlet cronJobs = await CronJobs.find({}).exec();\n\n\tif (!cronJobs.filter(a => a.name === 'Method Queue').length) {\n\t\tawait CronJobs.create(\n\t\t\t{\n\t\t\t\t_id: Types.ObjectId().toHexString(),\n\t\t\t\t__v: 0,\n\t\t\t\tname: 'Method Queue',\n\t\t\t\t\"repeat\" : true, \n\t\t\t\treoccuring: true,\n\t\t\t\t\"time_to_run\" : \"*/5 * * * * *\", \n\t\t\t\t\"method_run\" : \"methodQueue\", \n\t\t\t\t\"method_run_data\" : null, \n\t\t\t\t\"next_run\" : new Date(), \n\t\t\t\t\"running\" : false\n\t\t\t}\n\t\t);\n\t}\n\n\tif (!cronJobs.filter(a => a.name === 'Update Client Users').length) {\n\t\tawait CronJobs.create(\n\t\t\t{\n\t\t\t\t_id: Types.ObjectId().toHexString(),\n\t\t\t\t__v: 0,\n\t\t\t\tname: 'Update Client Users',\n\t\t\t\t\"repeat\" : true, \n\t\t\t\treoccuring: true,\n\t\t\t\t\"time_to_run\" : \"0 */1 * * *\", \n\t\t\t\t\"method_run\" : \"updateClientUsers\", \n\t\t\t\t\"method_run_data\" : null, \n\t\t\t\t\"next_run\" : new Date(), \n\t\t\t\t\"running\" : false\n\t\t\t}\n\t\t);\n\t}\n\n\tcronJobs.filter(a => a.running && a.next_run && a.next_run.getTime() < (new Date()).getTime()).forEach(cronJob => {\n\t\tCronJobs.updateOne({_id: cronJob._id}, {$set: {running: false}}).exec();\n\t});\n} "]}
|
package/fixtures/init.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/fixtures/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gFAAoE;AAGpE,qCAAiC;AAGjC,SAAsB,cAAc;;;;;wBAClB,qBAAM,oCAAW,CAAC,OAAO,EAAE,EAAA;;oBAAxC,UAAU,GAAG,SAA2B;oBAE5C,IAAI,CAAC,UAAU,EAAE;wBAChB,oCAAW,CAAC,MAAM,CAAC;4BAClB,GAAG,EAAE,gBAAK,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE;4BACnC,OAAO,EAAE,CAAC;yBACV,CAAC,CAAC;qBACH;;;;;CAqBD;AA7BD,wCA6BC","file":"init.js","sourcesContent":["import { AppVersions } from '../collections/app-version.collection';\nimport { LoggedInUsers } from '../collections/logged-in-users.collection';\nimport { ActiveSubscriptions } from '../collections/active-subscription.collection';\nimport { Types } from 'mongoose';\nimport { Users } from '../collections/user.collection';\n\nexport async function loadServerInit() {\n\tlet appVersion = await AppVersions.findOne();\n\n\tif (!appVersion) {\n\t\tAppVersions.create({\n\t\t\t_id: Types.ObjectId().toHexString(),\n\t\t\tversion: 1\n\t\t});\n\t}\n\n\t// await LoggedInUsers.deleteMany({}).exec();\n\t// await ActiveSubscriptions.deleteMany({}).exec();\n\n\t// let user = await Users.findOne({username: 'admin'});\n\t// if (!user) {\n\t// \tlet newUser = await Users.create({\n\t// \t\t_id: Types.ObjectId().toHexString(),\n\t// \t\t__v: 0,\n\t// \t\tusername: 'admin',\n\t// \t\temail: 'dev@resolveio.com',\n\t// \t\tfullname: 'Admin',\n\t// \t\troles: ['super-admin'],\n\t// \t\tactive: true\n\t// \t});\n\n\t// \tnewUser.setPassword('vVrbZtdHNCKwkCupibJ2GWZx', ((err, res) => {\n\t\t// newUser.resetAttempts();\n\t// \t}));\n\t// }\n}"]}
|
package/http/auth.js
CHANGED
package/http/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/http/auth.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAuD;AACvD,kCAAoC;AACpC,uCAAyC;AAEzC,wBAAqC;AAErC,SAAgB,eAAe,CAAC,UAA+B,EAAE,GAAG,EAAE,YAAY;IAAlF,iBAwdC;IAvdA,wDAAwD;IACxD,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAO,OAAO,EAAE,QAAQ;;;;;yBACtC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port * as handlebars from 'handlebars';\nimport ResolveIOMainServer from '../server-app';\nimport { ResolveIOServer } from '..';\n\nexport function setupAuthRoutes(mainServer: ResolveIOMainServer, app, serverConfig) {\n\t// Login via HTTP, return refresh token if authenticated\n\tapp.post('/login', async (request, response) => {\n\t\tif (request.headers.origin !== serverConfig['ROOT_URL'] && request.headers.origin !== serverConfig['SEC_ROOT_URL']) {\n\t\t\tresponse.send(JSON.stringify({\n\t\t\t\terror: true,\n\t\t\t\tresult: 'Invalid header'\n\t\t\t}));\n\t\t}\n\t\telse {\n\n\t\t\tlet user = await Users.findOne({username: request.body.username}).exec();\n\n\t\t\tif (!user) {\n\t\t\t\tuser = await Users.findOne({email: request.body.username}).exec();\n\t\t\t}\n\t\t\t\n\t\t\tlet username = user ? user.username : request.body.username;\n\n\t\t\tlet resAuth = await Users.authenticate()(username, request.body.password);\n\n\t\t\tif (resAuth.error) {\n\t\t\t\tif (resAuth.error.name === 'TooManyAttemptsError') {\n\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\terror: true,\n\t\t\t\t\t\tresult: resAuth.error.message + '. A password reset link has been sent to your email, please reset your password.'\n\t\t\t\t\t}));\n\n\t\t\t\t\tuser.services.forgot_password = jwt.sign({id_user: user._id}, serverConfig['JWT_SECRET']);\n\n\t\t\t\t\tlet emailData = {\n\t\t\t\t\t\tuserToChangePassword: user.fullname,\n\t\t\t\t\t\tuserWhoResetPassword: ResolveIOServer.getClientName() + ' System',\n\t\t\t\t\t\turl: serverConfig['ROOT_URL'] + '/forgot-password?' + encodeURIComponent(serverConfig['SERVER_URL']) + '&' + user.services.forgot_password\n\t\t\t\t\t};\n\n\t\t\t\t\tUsers.updateOne({_id: user._id}, {$set: {services: user.services}}).exec((errUp, resUp) => {\n\t\t\t\t\t\tmainServer.getMethodManager().readFile('email-templates/forgot-password.html').then(html => {\n\t\t\t\t\t\t\tlet template = handlebars.compile(html);\n\t\t\t\t\t\t\thandlebars.registerHelper('equals', (a, b) => {\n\t\t\t\t\t\t\t\treturn a === b;\n\t\t\t\t\t\t\t});\n\t\t\n\t\t\t\t\t\t\tmainServer.getMethodManager().sendEmail(user.email, 'ResolveIO (' + ResolveIOServer.getClientName() + ') - Forgot Password', '', template(emailData));\n\t\t\t\t\t\t}, errEmail => console.log(errEmail));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse if (resAuth.error === 'NoSaltValueStoredError') {\n\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\terror: true,\n\t\t\t\t\t\tresult: 'A password reset link has been sent to your email, please reset your password.'\n\t\t\t\t\t}));\n\n\t\t\t\t\tuser.services.forgot_password = jwt.sign({id_user: user._id}, serverConfig['JWT_SECRET']);\n\n\t\t\t\t\tlet emailData = {\n\t\t\t\t\t\tuserToChangePassword: user.fullname,\n\t\t\t\t\t\tuserWhoResetPassword: ResolveIOServer.getClientName() + ' System',\n\t\t\t\t\t\turl: serverConfig['ROOT_URL'] + '/forgot-password?' + encodeURIComponent(serverConfig['SERVER_URL']) + '&' + user.services.forgot_password\n\t\t\t\t\t};\n\n\t\t\t\t\tUsers.updateOne({_id: user._id}, {$set: {services: user.services}}).exec((errUp, resUp) => {\n\t\t\t\t\t\tmainServer.getMethodManager().readFile('email-templates/forgot-password.html').then(html => {\n\t\t\t\t\t\t\tlet template = handlebars.compile(html);\n\t\t\t\t\t\t\thandlebars.registerHelper('equals', (a, b) => {\n\t\t\t\t\t\t\t\treturn a === b;\n\t\t\t\t\t\t\t});\n\t\t\n\t\t\t\t\t\t\tmainServer.getMethodManager().sendEmail(user.email, 'ResolveIO (' + ResolveIOServer.getClientName() + ') - Forgot Password', '', template(emailData));\n\t\t\t\t\t\t}, errEmail => console.log(errEmail));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\terror: true,\n\t\t\t\t\t\tresult: resAuth.error.message\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (resAuth && resAuth.user && resAuth.user.active) {\n\t\t\t\t\tresAuth.user.resetAttempts((errAt, resAt) => {\n\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\terror: false,\n\t\t\t\t\t\t\tresult: {\n\t\t\t\t\t\t\t\ttoken: jwt.sign({id_user: resAuth.user._id}, serverConfig['JWT_SECRET'], {\n\t\t\t\t\t\t\t\t\texpiresIn : 90 * 24 * 60 * 60 * 1000 // 90 days\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});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tapp.post('/accessToken', async function (request, response) {\n\t\tif (request.headers.origin !== serverConfig['ROOT_URL'] && request.headers.origin !== serverConfig['SEC_ROOT_URL'] && request.headers.origin !== serverConfig['RESOLVEIO_URL'] && request.headers.origin !== serverConfig['RESOLVEIO_SECONDARY_URL']) {\n\t\t\tresponse.send(JSON.stringify({\n\t\t\t\terror: true,\n\t\t\t\tresult: 'Invalid header'\n\t\t\t}));\n\t\t}\n\t\telse {\n\t\t\tif (serverConfig['ROOT_URL'] !== 'http://localhost:4200') {\n\t\t\t\tjwt.verify(request.body.refreshToken, serverConfig['JWT_SECRET'], (err, decoded) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\tresult: 'Invalid Token'\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tUsers.findById(decoded['id_user']).exec().then((user) => {\n\t\t\t\t\t\t\tif (user) {\n\t\t\t\t\t\t\t\tif (user.active) {\n\t\t\t\t\t\t\t\t\tuser.resetAttempts((err, res) => {\n\t\t\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\t\t\terror: false,\n\t\t\t\t\t\t\t\t\t\t\tresult: {\n\t\t\t\t\t\t\t\t\t\t\t\ttoken: jwt.sign({id_user: user._id}, serverConfig['JWT_SECRET'], {\n\t\t\t\t\t\t\t\t\t\t\t\t\texpiresIn : 3 * 24 * 60 * 60 * 1000 // 3 days\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\tuser: user\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\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}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t\t\tresult: 'Account is Disabled'\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\telse {\n\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t\tresult: 'Invalid User'\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, error => {\n\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\tresult: 'Invalid Mongoose Get User'\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\t\n\t\t\telse {\n\t\t\t\tjwt.verify(request.body.refreshToken, serverConfig['JWT_SECRET'], (err, decoded) => {\n\t\t\t\t\tif (err) {\n\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\tresult: 'Invalid Token'\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tUsers.findById(decoded['id_user']).exec().then((user) => {\n\t\t\t\t\t\t\tif (user) {\n\t\t\t\t\t\t\t\tif (user.active) {\n\t\t\t\t\t\t\t\t\tuser.resetAttempts((err, res) => {\n\t\t\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\t\t\terror: false,\n\t\t\t\t\t\t\t\t\t\t\tresult: {\n\t\t\t\t\t\t\t\t\t\t\t\ttoken: jwt.sign({id_user: user._id}, serverConfig['JWT_SECRET'], {\n\t\t\t\t\t\t\t\t\t\t\t\t\texpiresIn : 3 * 24 * 60 * 60 * 1000 // 3 days\n\t\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t\t\tuser: user\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\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}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t\t\tresult: 'Account is Disabled'\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\telse {\n\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t\tresult: 'Invalid User'\n\t\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, error => {\n\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\tresult: 'Invalid Mongoose Get User'\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n\n\tapp.post('/userWithEnrollmentToken', function (request, response) {\n\t\tif (request.headers.origin !== serverConfig['ROOT_URL'] && request.headers.origin !== serverConfig['SEC_ROOT_URL'] && request.headers.origin !== serverConfig['RESOLVEIO_URL'] && request.headers.origin !== serverConfig['RESOLVEIO_SECONDARY_URL']) {\n\t\t\tresponse.send(JSON.stringify({\n\t\t\t\terror: true,\n\t\t\t\tresult: 'Invalid header'\n\t\t\t}));\n\t\t}\n\t\telse {\n\t\t\tjwt.verify(request.body.enrollmentToken, serverConfig['JWT_SECRET'], (err, decoded) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\terror: true,\n\t\t\t\t\t\tresult: 'Invalid Token'\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tUsers.findOne({\n\t\t\t\t\t\t$and: [\n\t\t\t\t\t\t\t{_id: decoded['id_user']},\n\t\t\t\t\t\t\t{'services.enrollment': request.body.enrollmentToken}\n\t\t\t\t\t\t]\n\t\t\t\t\t}).select('_id __v username active').exec().then((user) => {\n\t\t\t\t\t\tif (user) {\n\t\t\t\t\t\t\tif (user.active) {\n\n\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\terror: false,\n\t\t\t\t\t\t\t\t\tresult: {\n\t\t\t\t\t\t\t\t\t\tuser: user\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\telse {\n\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t\tresult: 'Account is Disabled'\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\telse {\n\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\tresult: 'Invalid User'\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t}\n\t\t\t\t\t}, error => {\n\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\tresult: 'Invalid Mongoose Get User'\n\t\t\t\t\t\t}));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\tapp.post('/setUserWithEnrollmentToken', function (request, response) {\n\t\tif (request.headers.origin !== serverConfig['ROOT_URL'] && request.headers.origin !== serverConfig['SEC_ROOT_URL'] && request.headers.origin !== serverConfig['RESOLVEIO_URL'] && request.headers.origin !== serverConfig['RESOLVEIO_SECONDARY_URL']) {\n\t\t\tresponse.send(JSON.stringify({\n\t\t\t\terror: true,\n\t\t\t\tresult: 'Invalid header'\n\t\t\t}));\n\t\t}\n\t\telse {\n\t\t\tjwt.verify(request.body.enrollmentToken, serverConfig['JWT_SECRET'], async (err, decoded) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\terror: true,\n\t\t\t\t\t\tresult: 'Invalid Token'\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tUsers.findOne({\n\t\t\t\t\t\t$and: [\n\t\t\t\t\t\t\t{_id: decoded['id_user']},\n\t\t\t\t\t\t\t{'services.enrollment': request.body.enrollmentToken}\n\t\t\t\t\t\t]\n\t\t\t\t\t}).exec().then((user) => {\n\t\t\t\t\t\tif (user) {\n\t\t\t\t\t\t\tif (user.active) {\n\t\t\t\t\t\t\t\tuser.setPassword(request.body.password, (errSet, resSet) => {\n\t\t\t\t\t\t\t\t\tif (resSet) {\n\n\t\t\t\t\t\t\t\t\t\tuser.services.enrollment = '';\n\n\t\t\t\t\t\t\t\t\t\tuser.resetAttempts();\n\n\t\t\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\t\t\terror: false,\n\t\t\t\t\t\t\t\t\t\t\tresult: true\n\t\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\telse {\n\t\t\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t\t\t\tresult: errSet\n\t\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});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t\tresult: 'Account is Disabled'\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\telse {\n\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\tresult: 'Invalid User'\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t}\n\t\t\t\t\t}, error => {\n\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\tresult: 'Invalid Mongoose Get User'\n\t\t\t\t\t\t}));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\tapp.post('/userWithForgotPasswordToken', function (request, response) {\n\t\tif (request.headers.origin !== serverConfig['ROOT_URL'] && request.headers.origin !== serverConfig['SEC_ROOT_URL'] && request.headers.origin !== serverConfig['RESOLVEIO_URL'] && request.headers.origin !== serverConfig['RESOLVEIO_SECONDARY_URL']) {\n\t\t\tresponse.send(JSON.stringify({\n\t\t\t\terror: true,\n\t\t\t\tresult: 'Invalid header'\n\t\t\t}));\n\t\t}\n\t\telse {\n\t\t\tjwt.verify(request.body.forgotPasswordToken, serverConfig['JWT_SECRET'], (err, decoded) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\terror: true,\n\t\t\t\t\t\tresult: 'Invalid Token'\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tUsers.findOne({\n\t\t\t\t\t\t$and: [\n\t\t\t\t\t\t\t{_id: decoded['id_user']},\n\t\t\t\t\t\t\t{'services.forgot_password': request.body.forgotPasswordToken}\n\t\t\t\t\t\t]\n\t\t\t\t\t}).select('_id __v username active').exec().then((user) => {\n\t\t\t\t\t\tif (user) {\n\t\t\t\t\t\t\tif (user.active) {\n\n\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\terror: false,\n\t\t\t\t\t\t\t\t\tresult: {\n\t\t\t\t\t\t\t\t\t\tuser: user\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\telse {\n\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t\tresult: 'Account is Disabled'\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\telse {\n\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\tresult: 'Invalid User'\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t}\n\t\t\t\t\t}, error => {\n\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\tresult: 'Invalid Mongoose Get User'\n\t\t\t\t\t\t}));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\tapp.post('/setUserWithForgotPasswordToken', function (request, response) {\n\t\tif (request.headers.origin !== serverConfig['ROOT_URL'] && request.headers.origin !== serverConfig['SEC_ROOT_URL'] && request.headers.origin !== serverConfig['RESOLVEIO_URL'] && request.headers.origin !== serverConfig['RESOLVEIO_SECONDARY_URL']) {\n\t\t\tresponse.send(JSON.stringify({\n\t\t\t\terror: true,\n\t\t\t\tresult: 'Invalid header'\n\t\t\t}));\n\t\t}\n\t\telse {\n\t\t\tjwt.verify(request.body.forgotPasswordToken, serverConfig['JWT_SECRET'], async (err, decoded) => {\n\t\t\t\tif (err) {\n\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\terror: true,\n\t\t\t\t\t\tresult: 'Invalid Token'\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tUsers.findOne({\n\t\t\t\t\t\t$and: [\n\t\t\t\t\t\t\t{_id: decoded['id_user']},\n\t\t\t\t\t\t\t{'services.forgot_password': request.body.forgotPasswordToken}\n\t\t\t\t\t\t]\n\t\t\t\t\t}).exec().then((user) => {\n\t\t\t\t\t\tif (user) {\n\t\t\t\t\t\t\tif (user.active) {\n\t\t\t\t\t\t\t\tuser.setPassword(request.body.password, (errSet, resSet) => {\n\t\t\t\t\t\t\t\t\tif (resSet) {\n\n\t\t\t\t\t\t\t\t\t\tuser.services.forgot_password = '';\n\n\t\t\t\t\t\t\t\t\t\tuser.resetAttempts();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\t\t\terror: false,\n\t\t\t\t\t\t\t\t\t\t\tresult: true\n\t\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\telse {\n\t\t\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t\t\t\tresult: errSet\n\t\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});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\t\tresult: 'Account is Disabled'\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\telse {\n\t\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\t\tresult: 'Invalid User'\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t}\n\t\t\t\t\t}, error => {\n\t\t\t\t\t\tresponse.send(JSON.stringify({\n\t\t\t\t\t\t\terror: true,\n\t\t\t\t\t\t\tresult: 'Invalid Mongoose Get User'\n\t\t\t\t\t\t}));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\tapp.post('/resetPassword', async (request, response) => {\n\t\tif (request.headers.origin !== serverConfig['ROOT_URL'] && request.headers.origin !== serverConfig['SEC_ROOT_URL']) {\n\t\t\tresponse.send(JSON.stringify({\n\t\t\t\terror: true,\n\t\t\t\tresult: 'Invalid header'\n\t\t\t}));\n\t\t}\n\t\telse {\n\n\t\t\tlet user = await Users.findOne({username: request.body.username}).exec();\n\n\t\t\tif (!user) {\n\t\t\t\tuser = await Users.findOne({email: request.body.username}).exec();\n\t\t\t}\n\t\t\t\n\t\t\tif (user) {\n\t\t\t\tmainServer.getMethodManager().callMethodInternal.call(mainServer.getMethodManager(), 'resetUserPassword', user._id);\n\t\t\t}\n\n\t\t\tresponse.send(JSON.stringify({\n\t\t\t\terror: false,\n\t\t\t\tresult: ''\n\t\t\t}));\n\t\t}\n\t});\n}"]}
|