@resolveio/server-lib 8.0.17 → 8.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/collections/app-status.collection.js +22 -13
- package/collections/app-status.collection.js.map +1 -1
- package/collections/app-version.collection.js +24 -15
- package/collections/app-version.collection.js.map +1 -1
- package/collections/counter.collection.js +24 -15
- package/collections/counter.collection.js.map +1 -1
- package/collections/cron-job-history.collection.js +23 -14
- package/collections/cron-job-history.collection.js.map +1 -1
- package/collections/cron-job.collection.js +23 -14
- package/collections/cron-job.collection.js.map +1 -1
- package/collections/email-history.collection.js +22 -13
- package/collections/email-history.collection.js.map +1 -1
- package/collections/email-verified.collection.js +22 -13
- package/collections/email-verified.collection.js.map +1 -1
- package/collections/file.collection.js +26 -17
- package/collections/file.collection.js.map +1 -1
- package/collections/flag.collection.js +22 -13
- package/collections/flag.collection.js.map +1 -1
- package/collections/log-method-latency.collection.js +21 -12
- package/collections/log-method-latency.collection.js.map +1 -1
- package/collections/log-subscription.collection.js +21 -12
- package/collections/log-subscription.collection.js.map +1 -1
- package/collections/log.collection.js +21 -12
- package/collections/log.collection.js.map +1 -1
- package/collections/logged-in-users.collection.js +22 -13
- package/collections/logged-in-users.collection.js.map +1 -1
- package/collections/method-call.collection.js +12 -3
- package/collections/method-call.collection.js.map +1 -1
- package/collections/method-response.collection.js +12 -3
- package/collections/method-response.collection.js.map +1 -1
- package/collections/monitor-cpu.collection.js +22 -13
- package/collections/monitor-cpu.collection.js.map +1 -1
- package/collections/monitor-https-inbound.collection.js +22 -13
- package/collections/monitor-https-inbound.collection.js.map +1 -1
- package/collections/monitor-https-outbound.collection.js +22 -13
- package/collections/monitor-https-outbound.collection.js.map +1 -1
- package/collections/monitor-memory.collection.js +22 -13
- package/collections/monitor-memory.collection.js.map +1 -1
- package/collections/monitor-mongo.collection.js +22 -13
- package/collections/monitor-mongo.collection.js.map +1 -1
- package/collections/notification.collection.js +22 -13
- package/collections/notification.collection.js.map +1 -1
- package/collections/queue-flag.collection.js +22 -13
- package/collections/queue-flag.collection.js.map +1 -1
- package/collections/queue-method.collection.js +64 -55
- package/collections/queue-method.collection.js.map +1 -1
- package/collections/queue-response.collection.js +23 -14
- package/collections/queue-response.collection.js.map +1 -1
- package/collections/report-builder-library.collection.js +23 -14
- package/collections/report-builder-library.collection.js.map +1 -1
- package/collections/report-builder-report.collection.js +23 -14
- package/collections/report-builder-report.collection.js.map +1 -1
- package/collections/user-group.collection.js +28 -19
- package/collections/user-group.collection.js.map +1 -1
- package/collections/user-guide.collection.js +26 -17
- package/collections/user-guide.collection.js.map +1 -1
- package/collections/user.collection.d.ts +0 -1
- package/collections/user.collection.js +27 -18
- package/collections/user.collection.js.map +1 -1
- package/cron/cron.d.ts +1 -1
- package/cron/cron.js +4 -4
- package/cron/cron.js.map +1 -1
- package/fixtures/cron-jobs.js +1 -0
- package/fixtures/cron-jobs.js.map +1 -1
- package/fixtures/init.js +1 -0
- package/fixtures/init.js.map +1 -1
- package/http/auth.js +1 -0
- package/http/auth.js.map +1 -1
- package/http/health.js +1 -0
- package/http/health.js.map +1 -1
- package/http/home.js +1 -0
- package/http/home.js.map +1 -1
- package/index.d.ts +1 -2
- package/index.js +12 -4
- package/index.js.map +1 -1
- package/managers/cron.manager.js +1 -0
- package/managers/cron.manager.js.map +1 -1
- package/managers/database.manager.js +1 -0
- package/managers/database.manager.js.map +1 -1
- package/managers/method.manager.js +1 -0
- package/managers/method.manager.js.map +1 -1
- package/managers/monitor.manager.js +1 -0
- package/managers/monitor.manager.js.map +1 -1
- package/managers/queue-method.manager.js +1 -0
- package/managers/queue-method.manager.js.map +1 -1
- package/managers/subscription.manager.js +1 -0
- package/managers/subscription.manager.js.map +1 -1
- package/methods/accounts.js +1 -0
- package/methods/accounts.js.map +1 -1
- package/methods/aws.js +1 -0
- package/methods/aws.js.map +1 -1
- package/methods/cloudconvert.js +1 -0
- package/methods/cloudconvert.js.map +1 -1
- package/methods/collections.js +1 -0
- package/methods/collections.js.map +1 -1
- package/methods/counters.js +1 -0
- package/methods/counters.js.map +1 -1
- package/methods/cron-jobs.js +1 -0
- package/methods/cron-jobs.js.map +1 -1
- package/methods/flags.js +1 -0
- package/methods/flags.js.map +1 -1
- package/methods/logs.js +1 -0
- package/methods/logs.js.map +1 -1
- package/methods/monitor.js +1 -0
- package/methods/monitor.js.map +1 -1
- package/methods/pdf.js +1 -0
- package/methods/pdf.js.map +1 -1
- package/methods/report-builder.js +1 -0
- package/methods/report-builder.js.map +1 -1
- package/methods/support.js +1 -0
- package/methods/support.js.map +1 -1
- package/models/pagination.model.js +1 -0
- package/models/pagination.model.js.map +1 -1
- package/package.json +14 -18
- package/public_api.js +80 -35
- package/public_api.js.map +1 -1
- package/publications/app-status.js +1 -0
- package/publications/app-status.js.map +1 -1
- package/publications/app-version.js +1 -0
- package/publications/app-version.js.map +1 -1
- package/publications/cron-jobs.js +1 -0
- package/publications/cron-jobs.js.map +1 -1
- package/publications/files.js +1 -0
- package/publications/files.js.map +1 -1
- package/publications/flags.js +1 -0
- package/publications/flags.js.map +1 -1
- package/publications/logs.js +1 -0
- package/publications/logs.js.map +1 -1
- package/publications/method-calls.js +1 -0
- package/publications/method-calls.js.map +1 -1
- package/publications/method-responses.js +1 -0
- package/publications/method-responses.js.map +1 -1
- package/publications/notifications.js +1 -0
- package/publications/notifications.js.map +1 -1
- package/publications/report-builder-libraries.js +1 -0
- package/publications/report-builder-libraries.js.map +1 -1
- package/publications/report-builder-reports.js +1 -0
- package/publications/report-builder-reports.js.map +1 -1
- package/publications/super-admin.js +1 -0
- package/publications/super-admin.js.map +1 -1
- package/publications/user-groups.js +1 -0
- package/publications/user-groups.js.map +1 -1
- package/publications/user-guides.js +1 -0
- package/publications/user-guides.js.map +1 -1
- package/server-app.js +30 -21
- package/server-app.js.map +1 -1
- package/util/common.js +1 -0
- package/util/common.js.map +1 -1
- package/util/schema-report-builder.js +1 -0
- package/util/schema-report-builder.js.map +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppStatusVersions = exports.AppStatus = void 0;
|
|
3
4
|
var mongoose_1 = require("mongoose");
|
|
4
5
|
var simpl_schema_1 = require("simpl-schema");
|
|
5
6
|
var index_1 = require("../index");
|
|
@@ -31,19 +32,27 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
31
32
|
});
|
|
32
33
|
exports.AppStatus = null;
|
|
33
34
|
exports.AppStatusVersions = null;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
initializeCollection();
|
|
36
|
+
function initializeCollection() {
|
|
37
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
38
|
+
exports.AppStatus = index_1.ResolveIOServer.getMainDB().model('app-statuses', DefaultSchema);
|
|
39
|
+
exports.AppStatus['simplschema'] = new simpl_schema_1.default(schema);
|
|
40
|
+
schema._id = {
|
|
41
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
42
|
+
};
|
|
43
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
44
|
+
skipVersioning: true,
|
|
45
|
+
versionKey: false,
|
|
46
|
+
timestamps: true
|
|
47
|
+
});
|
|
48
|
+
exports.AppStatus['versionCollection'] = 'app-statuses.versions';
|
|
49
|
+
index_1.ResolveIOServer.getMainDB().model(exports.AppStatus['versionCollection'], VersionSchema);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
setTimeout(function () {
|
|
53
|
+
initializeCollection();
|
|
54
|
+
}, 0);
|
|
55
|
+
}
|
|
47
56
|
}
|
|
48
57
|
|
|
49
58
|
//# sourceMappingURL=app-status.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/app-status.collection.ts"],"names":[],"mappings":"
|
|
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;AAIQ,QAAA,SAAS,GAA0B,IAAI,CAAC;AACxC,QAAA,iBAAiB,GAA0B,IAAI,CAAC;AAE3D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,iBAAS,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;QAE7E,iBAAS,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;QAEpD,MAAM,CAAC,GAAG,GAAG;YACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;YACtC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,iBAAS,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,CAAC;QAEzD,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,iBAAS,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KACjF;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,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 {}\n\nexport let AppStatus: Model<ResolveIOModel> = null;\nexport let AppStatusVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tAppStatus = ResolveIOServer.getMainDB().model('app-statuses', DefaultSchema);\n\n\t\tAppStatus['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tAppStatus['versionCollection'] = 'app-statuses.versions';\n\n\t\tResolveIOServer.getMainDB().model(AppStatus['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.AppVersionVersions = exports.AppVersions = void 0;
|
|
14
15
|
var mongoose_1 = require("mongoose");
|
|
15
16
|
var simpl_schema_1 = require("simpl-schema");
|
|
16
17
|
var index_1 = require("../index");
|
|
@@ -42,21 +43,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
42
43
|
});
|
|
43
44
|
exports.AppVersions = null;
|
|
44
45
|
exports.AppVersionVersions = null;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
initializeCollection();
|
|
47
|
+
function initializeCollection() {
|
|
48
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
49
|
+
exports.AppVersions = index_1.ResolveIOServer.getMainDB().model('app-versions', DefaultSchema);
|
|
50
|
+
var checkSchema = __assign({}, schema);
|
|
51
|
+
checkSchema._id = {
|
|
52
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
53
|
+
};
|
|
54
|
+
var VersionSchema = new mongoose_1.Schema(checkSchema, {
|
|
55
|
+
skipVersioning: true,
|
|
56
|
+
versionKey: false,
|
|
57
|
+
timestamps: true
|
|
58
|
+
});
|
|
59
|
+
exports.AppVersions['versionCollection'] = 'app-versions.versions';
|
|
60
|
+
exports.AppVersionVersions = index_1.ResolveIOServer.getMainDB().model(exports.AppVersions['versionCollection'], VersionSchema);
|
|
61
|
+
schema.version.type = simpl_schema_1.default.Integer;
|
|
62
|
+
exports.AppVersions['simplschema'] = new simpl_schema_1.default(schema);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
setTimeout(function () {
|
|
66
|
+
initializeCollection();
|
|
67
|
+
}, 0);
|
|
68
|
+
}
|
|
60
69
|
}
|
|
61
70
|
|
|
62
71
|
//# sourceMappingURL=app-version.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/app-version.collection.ts"],"names":[],"mappings":"
|
|
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;AAGQ,QAAA,WAAW,GAA0B,IAAI,CAAC;AAC1C,QAAA,kBAAkB,GAA0B,IAAI,CAAC;AAE5D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,mBAAW,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;QAE/E,IAAI,WAAW,gBAAQ,MAAM,CAAE,CAAC;QAEhC,WAAW,CAAC,GAAG,GAAG;YACjB,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,WAAW,EAAE;YAC3C,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,mBAAW,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,CAAC;QAE3D,0BAAkB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,mBAAW,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;QAExG,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,sBAAY,CAAC,OAAO,CAAC;QAE3C,mBAAW,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;KACtD;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,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 let AppVersions: Model<ResolveIOModel> = null;\nexport let AppVersionVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tAppVersions = ResolveIOServer.getMainDB().model('app-versions', DefaultSchema);\n\n\t\tlet checkSchema = { ...schema };\n\n\t\tcheckSchema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(checkSchema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tAppVersions['versionCollection'] = 'app-versions.versions';\n\n\t\tAppVersionVersions = ResolveIOServer.getMainDB().model(AppVersions['versionCollection'], VersionSchema);\n\n\t\tschema.version.type = SimpleSchema.Integer;\n\n\t\tAppVersions['simplschema'] = new SimpleSchema(schema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.CounterVersions = exports.Counters = void 0;
|
|
14
15
|
var mongoose_1 = require("mongoose");
|
|
15
16
|
var simpl_schema_1 = require("simpl-schema");
|
|
16
17
|
var index_1 = require("../index");
|
|
@@ -45,21 +46,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
45
46
|
});
|
|
46
47
|
exports.Counters = null;
|
|
47
48
|
exports.CounterVersions = null;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
49
|
+
initializeCollection();
|
|
50
|
+
function initializeCollection() {
|
|
51
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
52
|
+
exports.Counters = index_1.ResolveIOServer.getMainDB().model('counters', DefaultSchema);
|
|
53
|
+
var checkSchema = __assign({}, schema);
|
|
54
|
+
checkSchema._id = {
|
|
55
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
56
|
+
};
|
|
57
|
+
var VersionSchema = new mongoose_1.Schema(checkSchema, {
|
|
58
|
+
skipVersioning: true,
|
|
59
|
+
versionKey: false,
|
|
60
|
+
timestamps: true
|
|
61
|
+
});
|
|
62
|
+
exports.Counters['versionCollection'] = 'counters.versions';
|
|
63
|
+
exports.CounterVersions = index_1.ResolveIOServer.getMainDB().model(exports.Counters['versionCollection'], VersionSchema);
|
|
64
|
+
schema.count.type = simpl_schema_1.default.Integer;
|
|
65
|
+
exports.Counters['simplschema'] = new simpl_schema_1.default(schema);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
setTimeout(function () {
|
|
69
|
+
initializeCollection();
|
|
70
|
+
}, 0);
|
|
71
|
+
}
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
//# sourceMappingURL=counter.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/counter.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/counter.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,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;AAIQ,QAAA,QAAQ,GAA0B,IAAI,CAAC;AACvC,QAAA,eAAe,GAA0B,IAAI,CAAC;AAEzD,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,gBAAQ,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;QAExE,IAAI,WAAW,gBAAQ,MAAM,CAAE,CAAC;QAEhC,WAAW,CAAC,GAAG,GAAG;YACjB,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,WAAW,EAAE;YAC3C,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,gBAAQ,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAAC;QAEpD,uBAAe,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,gBAAQ,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;QAElG,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,sBAAY,CAAC,OAAO,CAAC;QACzC,gBAAQ,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;KACnD;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","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 {}\n\nexport let Counters: Model<ResolveIOModel> = null;\nexport let CounterVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tCounters = ResolveIOServer.getMainDB().model('counters', DefaultSchema);\n\n\t\tlet checkSchema = { ...schema };\n\n\t\tcheckSchema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(checkSchema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tCounters['versionCollection'] = 'counters.versions';\n\n\t\tCounterVersions = ResolveIOServer.getMainDB().model(Counters['versionCollection'], VersionSchema);\n\n\t\tschema.count.type = SimpleSchema.Integer;\n\t\tCounters['simplschema'] = new SimpleSchema(schema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.CronJobHistoryVersions = exports.CronJobHistory = void 0;
|
|
14
15
|
var mongoose_1 = require("mongoose");
|
|
15
16
|
var simpl_schema_1 = require("simpl-schema");
|
|
16
17
|
var index_1 = require("../index");
|
|
@@ -73,20 +74,28 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
73
74
|
DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 7 });
|
|
74
75
|
exports.CronJobHistory = null;
|
|
75
76
|
exports.CronJobHistoryVersions = null;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
77
|
+
initializeCollection();
|
|
78
|
+
function initializeCollection() {
|
|
79
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
80
|
+
exports.CronJobHistory = index_1.ResolveIOServer.getMainDB().model('cron-job-histories', DefaultSchema);
|
|
81
|
+
var vSchema = __assign({}, schema);
|
|
82
|
+
vSchema._id = {
|
|
83
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
84
|
+
};
|
|
85
|
+
var VersionSchema = new mongoose_1.Schema(vSchema, {
|
|
86
|
+
skipVersioning: true,
|
|
87
|
+
versionKey: false,
|
|
88
|
+
timestamps: true
|
|
89
|
+
});
|
|
90
|
+
exports.CronJobHistory['versionCollection'] = 'cron-job-histories.versions';
|
|
91
|
+
exports.CronJobHistoryVersions = index_1.ResolveIOServer.getMainDB().model(exports.CronJobHistory['versionCollection'], VersionSchema);
|
|
92
|
+
exports.CronJobHistory['simplschema'] = new simpl_schema_1.default(schema);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
setTimeout(function () {
|
|
96
|
+
initializeCollection();
|
|
97
|
+
}, 0);
|
|
98
|
+
}
|
|
90
99
|
}
|
|
91
100
|
|
|
92
101
|
//# sourceMappingURL=cron-job-history.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/cron-job-history.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/cron-job-history.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAmD;AACnD,6C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,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,sBAAc,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,oBAAoB,EAAE,aAAa,CAAC,CAAC;QAExF,IAAI,OAAO,gBAAQ,MAAM,CAAE,CAAC;QAE5B,OAAO,CAAC,GAAG,GAAG;YACb,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,OAAO,EAAE;YACvC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,sBAAc,CAAC,mBAAmB,CAAC,GAAG,6BAA6B,CAAC;QAEpE,8BAAsB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;QAE/G,sBAAc,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;KACzD;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"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 {}\n\nexport let CronJobHistory: Model<ResolveIOModel> = null;\nexport let CronJobHistoryVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tCronJobHistory = ResolveIOServer.getMainDB().model('cron-job-histories', DefaultSchema);\n\n\t\tlet vSchema = { ...schema };\n\t\t\n\t\tvSchema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(vSchema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tCronJobHistory['versionCollection'] = 'cron-job-histories.versions';\n\n\t\tCronJobHistoryVersions = ResolveIOServer.getMainDB().model(CronJobHistory['versionCollection'], VersionSchema);\n\n\t\tCronJobHistory['simplschema'] = new SimpleSchema(schema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.CronJobVersions = exports.CronJobs = void 0;
|
|
14
15
|
var mongoose_1 = require("mongoose");
|
|
15
16
|
var simpl_schema_1 = require("simpl-schema");
|
|
16
17
|
var index_1 = require("../index");
|
|
@@ -76,20 +77,28 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
76
77
|
});
|
|
77
78
|
exports.CronJobs = null;
|
|
78
79
|
exports.CronJobVersions = null;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
80
|
+
initializeCollection();
|
|
81
|
+
function initializeCollection() {
|
|
82
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
83
|
+
exports.CronJobs = index_1.ResolveIOServer.getMainDB().model('cron-jobs', DefaultSchema);
|
|
84
|
+
var vSchema = __assign({}, schema);
|
|
85
|
+
vSchema._id = {
|
|
86
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
87
|
+
};
|
|
88
|
+
var VersionSchema = new mongoose_1.Schema(vSchema, {
|
|
89
|
+
skipVersioning: true,
|
|
90
|
+
versionKey: false,
|
|
91
|
+
timestamps: true
|
|
92
|
+
});
|
|
93
|
+
exports.CronJobs['versionCollection'] = 'cron-jobs.versions';
|
|
94
|
+
exports.CronJobVersions = index_1.ResolveIOServer.getMainDB().model(exports.CronJobs['versionCollection'], VersionSchema);
|
|
95
|
+
exports.CronJobs['simplschema'] = new simpl_schema_1.default(schema);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
setTimeout(function () {
|
|
99
|
+
initializeCollection();
|
|
100
|
+
}, 0);
|
|
101
|
+
}
|
|
93
102
|
}
|
|
94
103
|
|
|
95
104
|
//# sourceMappingURL=cron-job.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/cron-job.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/cron-job.collection.ts"],"names":[],"mappings":";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AEzD,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,gBAAQ,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;QAEzE,IAAI,OAAO,gBAAQ,MAAM,CAAE,CAAC;QAC5B,OAAO,CAAC,GAAG,GAAG;YACb,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,OAAO,EAAE;YACvC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,gBAAQ,CAAC,mBAAmB,CAAC,GAAG,oBAAoB,CAAC;QAErD,uBAAe,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,gBAAQ,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;QAElG,gBAAQ,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;KACnD;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,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 {}\n\nexport let CronJobs: Model<ResolveIOModel> = null;\nexport let CronJobVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tCronJobs = ResolveIOServer.getMainDB().model('cron-jobs', DefaultSchema);\n\n\t\tlet vSchema = { ...schema };\n\t\tvSchema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(vSchema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tCronJobs['versionCollection'] = 'cron-jobs.versions';\n\n\t\tCronJobVersions = ResolveIOServer.getMainDB().model(CronJobs['versionCollection'], VersionSchema);\n\n\t\tCronJobs['simplschema'] = new SimpleSchema(schema); \n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailHistoryVersions = exports.EmailHistories = void 0;
|
|
3
4
|
var mongoose_1 = require("mongoose");
|
|
4
5
|
var simpl_schema_1 = require("simpl-schema");
|
|
5
6
|
var index_1 = require("../index");
|
|
@@ -46,19 +47,27 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
46
47
|
});
|
|
47
48
|
exports.EmailHistories = null;
|
|
48
49
|
exports.EmailHistoryVersions = null;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
initializeCollection();
|
|
51
|
+
function initializeCollection() {
|
|
52
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
53
|
+
exports.EmailHistories = index_1.ResolveIOServer.getMainDB().model('email-histories', DefaultSchema);
|
|
54
|
+
exports.EmailHistories['simplschema'] = new simpl_schema_1.default(schema);
|
|
55
|
+
schema._id = {
|
|
56
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
57
|
+
};
|
|
58
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
59
|
+
skipVersioning: true,
|
|
60
|
+
versionKey: false,
|
|
61
|
+
timestamps: true
|
|
62
|
+
});
|
|
63
|
+
exports.EmailHistories['versionCollection'] = 'email-histories.versions';
|
|
64
|
+
exports.EmailHistoryVersions = index_1.ResolveIOServer.getMainDB().model(exports.EmailHistories['versionCollection'], VersionSchema);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
setTimeout(function () {
|
|
68
|
+
initializeCollection();
|
|
69
|
+
}, 0);
|
|
70
|
+
}
|
|
62
71
|
}
|
|
63
72
|
|
|
64
73
|
//# sourceMappingURL=email-history.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/email-history.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/email-history.collection.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG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AAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,sBAAc,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,CAAC;QAEjE,4BAAoB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC7G;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"email-history.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { EmailHistoryModel } from '../models/email-history.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\temail: {\n\t\ttype: String\n\t},\n\tsuccess: {\n\t\ttype: Boolean\n\t},\n\tverified: {\n\t\ttype: Boolean\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends EmailHistoryModel, Document {}\n\nexport let EmailHistories: Model<ResolveIOModel> = null;\nexport let EmailHistoryVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tEmailHistories = ResolveIOServer.getMainDB().model('email-histories', DefaultSchema);\n\n\t\tEmailHistories['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tEmailHistories['versionCollection'] = 'email-histories.versions';\n\n\t\tEmailHistoryVersions = ResolveIOServer.getMainDB().model(EmailHistories['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailVerifyVersions = exports.EmailVerifies = void 0;
|
|
3
4
|
var mongoose_1 = require("mongoose");
|
|
4
5
|
var simpl_schema_1 = require("simpl-schema");
|
|
5
6
|
var index_1 = require("../index");
|
|
@@ -41,19 +42,27 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
41
42
|
DefaultSchema.index({ email: 1 });
|
|
42
43
|
exports.EmailVerifies = null;
|
|
43
44
|
exports.EmailVerifyVersions = null;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
initializeCollection();
|
|
46
|
+
function initializeCollection() {
|
|
47
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
48
|
+
exports.EmailVerifies = index_1.ResolveIOServer.getMainDB().model('email-verifies', DefaultSchema);
|
|
49
|
+
exports.EmailVerifies['simplschema'] = new simpl_schema_1.default(schema);
|
|
50
|
+
schema._id = {
|
|
51
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
52
|
+
};
|
|
53
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
54
|
+
skipVersioning: true,
|
|
55
|
+
versionKey: false,
|
|
56
|
+
timestamps: true
|
|
57
|
+
});
|
|
58
|
+
exports.EmailVerifies['versionCollection'] = 'email-verifies.versions';
|
|
59
|
+
exports.EmailVerifyVersions = index_1.ResolveIOServer.getMainDB().model(exports.EmailVerifies['versionCollection'], VersionSchema);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
setTimeout(function () {
|
|
63
|
+
initializeCollection();
|
|
64
|
+
}, 0);
|
|
65
|
+
}
|
|
57
66
|
}
|
|
58
67
|
|
|
59
68
|
//# sourceMappingURL=email-verified.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/email-verified.collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/collections/email-verified.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,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;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;AAIrB,QAAA,aAAa,GAA0B,IAAI,CAAC;AAC5C,QAAA,mBAAmB,GAA0B,IAAI,CAAC;AAE7D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,qBAAa,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;QAEnF,qBAAa,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;QAExD,MAAM,CAAC,GAAG,GAAG;YACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;YACtC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,qBAAa,CAAC,mBAAmB,CAAC,GAAG,yBAAyB,CAAC;QAE/D,2BAAmB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,qBAAa,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC3G;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"email-verified.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { EmailVerifiedModel } from '../models/email-verified.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\temail: {\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({email: 1});\n\ninterface ResolveIOModel extends EmailVerifiedModel, Document {}\n\nexport let EmailVerifies: Model<ResolveIOModel> = null;\nexport let EmailVerifyVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tEmailVerifies = ResolveIOServer.getMainDB().model('email-verifies', DefaultSchema);\n\n\t\tEmailVerifies['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tEmailVerifies['versionCollection'] = 'email-verifies.versions';\n\n\t\tEmailVerifyVersions = ResolveIOServer.getMainDB().model(EmailVerifies['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileVersions = exports.Files = void 0;
|
|
3
4
|
var mongoose_1 = require("mongoose");
|
|
4
5
|
var simpl_schema_1 = require("simpl-schema");
|
|
5
6
|
var index_1 = require("../index");
|
|
@@ -52,23 +53,31 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
|
|
|
52
53
|
});
|
|
53
54
|
exports.Files = null;
|
|
54
55
|
exports.FileVersions = null;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
56
|
+
initializeCollection();
|
|
57
|
+
function initializeCollection() {
|
|
58
|
+
if (index_1.ResolveIOServer.getMainDB()) {
|
|
59
|
+
exports.Files = index_1.ResolveIOServer.getMainDB().model('files', DefaultSchema);
|
|
60
|
+
exports.Files['simplschema'] = new simpl_schema_1.default(schema);
|
|
61
|
+
schema._id = {
|
|
62
|
+
type: mongoose_1.Schema.Types.Mixed
|
|
63
|
+
};
|
|
64
|
+
var VersionSchema = new mongoose_1.Schema(schema, {
|
|
65
|
+
skipVersioning: true,
|
|
66
|
+
versionKey: false,
|
|
67
|
+
timestamps: true
|
|
68
|
+
});
|
|
69
|
+
exports.Files['versionCollection'] = 'files.versions';
|
|
70
|
+
exports.FileVersions = index_1.ResolveIOServer.getMainDB().model(exports.Files['versionCollection'], VersionSchema);
|
|
71
|
+
//------------- Report Builder Schema
|
|
72
|
+
var rbLookups = [];
|
|
73
|
+
var rbSchema = Object.assign(schema, schema_report_builder_1.buildRbLookups(rbLookups, DefaultSchema, []));
|
|
74
|
+
exports.Files['rbSchema'] = schema_report_builder_1.buildRbSchema(rbSchema);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
setTimeout(function () {
|
|
78
|
+
initializeCollection();
|
|
79
|
+
}, 0);
|
|
80
|
+
}
|
|
72
81
|
}
|
|
73
82
|
|
|
74
83
|
//# sourceMappingURL=file.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/file.collection.ts"],"names":[],"mappings":"
|
|
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,M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,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,aAAK,CAAC,mBAAmB,CAAC,GAAG,gBAAgB,CAAC;QAE9C,oBAAY,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,aAAK,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;QAE5F,qCAAqC;QACrC,IAAI,SAAS,GAAmB,EAAE,CAAC;QAEnC,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,sCAAc,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC;QACnF,aAAK,CAAC,UAAU,CAAC,GAAG,qCAAa,CAAC,QAAQ,CAAC,CAAC;KAC5C;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,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\tdefault: {\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 FileModel, Document {}\n\nexport let Files: Model<ResolveIOModel> = null;\nexport let FileVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tFiles = ResolveIOServer.getMainDB().model('files', DefaultSchema);\n\n\t\tFiles['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tFiles['versionCollection'] = 'files.versions';\n\n\t\tFileVersions = ResolveIOServer.getMainDB().model(Files['versionCollection'], VersionSchema);\n\n\t\t//------------- Report Builder Schema\n\t\tlet rbLookups: LookupTables[] = [];\n\n\t\tlet rbSchema = Object.assign(schema, buildRbLookups(rbLookups, DefaultSchema, []));\n\t\tFiles['rbSchema'] = buildRbSchema(rbSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
|