@resolveio/server-lib 20.7.120 → 20.7.122
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 +51 -1
- package/client-server-app.js.map +1 -1
- package/collections/app-status.collection.js +51 -1
- package/collections/app-status.collection.js.map +1 -1
- package/collections/counter.collection.js +55 -1
- package/collections/counter.collection.js.map +1 -1
- package/collections/cron-job-history.collection.js +136 -1
- package/collections/cron-job-history.collection.js.map +1 -1
- package/collections/cron-job.collection.js +87 -1
- package/collections/cron-job.collection.js.map +1 -1
- package/collections/email-history.collection.js +98 -1
- package/collections/email-history.collection.js.map +1 -1
- package/collections/email-verified.collection.js +60 -1
- package/collections/email-verified.collection.js.map +1 -1
- package/collections/file.collection.js +73 -1
- package/collections/file.collection.js.map +1 -1
- package/collections/flag-update.collection.js +56 -1
- package/collections/flag-update.collection.js.map +1 -1
- package/collections/flag.collection.js +56 -1
- package/collections/flag.collection.js.map +1 -1
- package/collections/log-method-latency.collection.js +72 -1
- package/collections/log-method-latency.collection.js.map +1 -1
- package/collections/log-subscription.collection.js +75 -1
- package/collections/log-subscription.collection.js.map +1 -1
- package/collections/log.collection.js +87 -1
- package/collections/log.collection.js.map +1 -1
- package/collections/logged-in-users.collection.js +66 -1
- package/collections/logged-in-users.collection.js.map +1 -1
- package/collections/monitor-cpu.collection.js +64 -1
- package/collections/monitor-cpu.collection.js.map +1 -1
- package/collections/monitor-function.collection.js +73 -1
- package/collections/monitor-function.collection.js.map +1 -1
- package/collections/monitor-memory.collection.js +76 -1
- package/collections/monitor-memory.collection.js.map +1 -1
- package/collections/monitor-mongo.collection.js +70 -1
- package/collections/monitor-mongo.collection.js.map +1 -1
- package/collections/notification.collection.js +56 -1
- package/collections/notification.collection.js.map +1 -1
- package/collections/report-builder-dashboard-builder.collection.js +108 -1
- package/collections/report-builder-dashboard-builder.collection.js.map +1 -1
- package/collections/report-builder-library.collection.js +86 -1
- package/collections/report-builder-library.collection.js.map +1 -1
- package/collections/report-builder-report.collection.js +148 -1
- package/collections/report-builder-report.collection.js.map +1 -1
- package/collections/user-group.collection.js +88 -1
- package/collections/user-group.collection.js.map +1 -1
- package/collections/user-guide.collection.js +56 -1
- package/collections/user-guide.collection.js.map +1 -1
- package/collections/user.collection.js +265 -1
- package/collections/user.collection.js.map +1 -1
- package/cron/cron.js +97 -1
- package/cron/cron.js.map +1 -1
- package/fixtures/cron-jobs.js +95 -1
- package/fixtures/cron-jobs.js.map +1 -1
- package/fixtures/init.js +78 -1
- package/fixtures/init.js.map +1 -1
- package/http/auth.js +869 -1
- package/http/auth.js.map +1 -1
- package/http/health.js +11 -1
- package/http/health.js.map +1 -1
- package/http/home.js +114 -1
- package/http/home.js.map +1 -1
- package/index.js +18 -1
- package/index.js.map +1 -1
- package/managers/cron.manager.js +461 -1
- package/managers/cron.manager.js.map +1 -1
- package/managers/local-log.manager.js +79 -1
- package/managers/local-log.manager.js.map +1 -1
- package/managers/method.manager.js +1025 -1
- package/managers/method.manager.js.map +1 -1
- package/managers/mongo.manager.js +4231 -1
- package/managers/mongo.manager.js.map +1 -1
- package/managers/monitor.manager.js +534 -1
- package/managers/monitor.manager.js.map +1 -1
- package/managers/subscription.manager.js +1292 -1
- package/managers/subscription.manager.js.map +1 -1
- package/managers/websocket.manager.js +165 -1
- package/managers/websocket.manager.js.map +1 -1
- package/managers/worker-dispatcher.manager.js +335 -1
- package/managers/worker-dispatcher.manager.js.map +1 -1
- package/managers/worker-server.manager.js +292 -1
- package/managers/worker-server.manager.js.map +1 -1
- package/methods/accounts.js +302 -1
- package/methods/accounts.js.map +1 -1
- package/methods/aws.js +748 -1
- package/methods/aws.js.map +1 -1
- package/methods/collections.js +542 -1
- package/methods/collections.js.map +1 -1
- package/methods/counters.js +111 -1
- package/methods/counters.js.map +1 -1
- package/methods/cron-jobs.js +1476 -1
- package/methods/cron-jobs.js.map +1 -1
- package/methods/flag-updates.js +8 -1
- package/methods/flag-updates.js.map +1 -1
- package/methods/flags.js +8 -1
- package/methods/flags.js.map +1 -1
- package/methods/logs.js +417 -1
- package/methods/logs.js.map +1 -1
- package/methods/monitor.js +543 -1
- package/methods/monitor.js.map +1 -1
- package/methods/pdf.js +742 -1
- package/methods/pdf.js.map +1 -1
- package/methods/report-builder.js +840 -1
- package/methods/report-builder.js.map +1 -1
- package/methods/support.js +232 -1
- package/methods/support.js.map +1 -1
- package/models/app-status.model.js +3 -1
- package/models/app-status.model.js.map +1 -1
- package/models/billing-logged-in-users.model.js +3 -1
- package/models/billing-logged-in-users.model.js.map +1 -1
- package/models/collection-document.model.js +3 -1
- package/models/collection-document.model.js.map +1 -1
- package/models/counter.model.js +3 -1
- package/models/counter.model.js.map +1 -1
- package/models/cron-job-history.model.js +3 -1
- package/models/cron-job-history.model.js.map +1 -1
- package/models/cron-job.model.js +3 -1
- package/models/cron-job.model.js.map +1 -1
- package/models/dialog.model.js +3 -1
- package/models/dialog.model.js.map +1 -1
- package/models/email-history.model.js +15 -1
- package/models/email-history.model.js.map +1 -1
- package/models/email-verified.model.js +3 -1
- package/models/email-verified.model.js.map +1 -1
- package/models/file.model.js +3 -1
- package/models/file.model.js.map +1 -1
- package/models/flag-update.model.js +3 -1
- package/models/flag-update.model.js.map +1 -1
- package/models/flag.model.js +3 -1
- package/models/flag.model.js.map +1 -1
- package/models/log-method-latency.model.js +3 -1
- package/models/log-method-latency.model.js.map +1 -1
- package/models/log-subscription.model.js +3 -1
- package/models/log-subscription.model.js.map +1 -1
- package/models/log.model.js +3 -1
- package/models/log.model.js.map +1 -1
- package/models/logged-in-users.model.js +3 -1
- package/models/logged-in-users.model.js.map +1 -1
- package/models/method-response.model.js +3 -1
- package/models/method-response.model.js.map +1 -1
- package/models/method.model.d.ts +0 -1
- package/models/method.model.js +3 -1
- package/models/method.model.js.map +1 -1
- package/models/monitor-cpu.model.js +3 -1
- package/models/monitor-cpu.model.js.map +1 -1
- package/models/monitor-function.model.js +3 -1
- package/models/monitor-function.model.js.map +1 -1
- package/models/monitor-memory.model.js +3 -1
- package/models/monitor-memory.model.js.map +1 -1
- package/models/monitor-mongo.model.js +3 -1
- package/models/monitor-mongo.model.js.map +1 -1
- package/models/notification.model.js +3 -1
- package/models/notification.model.js.map +1 -1
- package/models/pagination.model.js +23 -1
- package/models/pagination.model.js.map +1 -1
- package/models/permission.model.js +3 -1
- package/models/permission.model.js.map +1 -1
- package/models/report-builder-dashboard-builder.model.js +3 -1
- package/models/report-builder-dashboard-builder.model.js.map +1 -1
- package/models/report-builder-library.model.js +3 -1
- package/models/report-builder-library.model.js.map +1 -1
- package/models/report-builder-report.model.js +3 -1
- package/models/report-builder-report.model.js.map +1 -1
- package/models/report-builder.model.js +3 -1
- package/models/report-builder.model.js.map +1 -1
- package/models/select-data-label.model.js +3 -1
- package/models/select-data-label.model.js.map +1 -1
- package/models/server-message.model.js +3 -1
- package/models/server-message.model.js.map +1 -1
- package/models/subscription.model.js +3 -1
- package/models/subscription.model.js.map +1 -1
- package/models/support-ticket.model.js +3 -1
- package/models/support-ticket.model.js.map +1 -1
- package/models/user-group.model.js +3 -1
- package/models/user-group.model.js.map +1 -1
- package/models/user-guide.model.js +3 -1
- package/models/user-guide.model.js.map +1 -1
- package/models/user.model.js +3 -1
- package/models/user.model.js.map +1 -1
- package/package.json +1 -1
- package/public_api.js +77 -1
- package/public_api.js.map +1 -1
- package/publications/app-status.js +16 -1
- package/publications/app-status.js.map +1 -1
- package/publications/cron-jobs.js +32 -1
- package/publications/cron-jobs.js.map +1 -1
- package/publications/files.js +36 -1
- package/publications/files.js.map +1 -1
- package/publications/flags-update.js +22 -1
- package/publications/flags-update.js.map +1 -1
- package/publications/flags.js +22 -1
- package/publications/flags.js.map +1 -1
- package/publications/logs.js +164 -1
- package/publications/logs.js.map +1 -1
- package/publications/notifications.js +16 -1
- package/publications/notifications.js.map +1 -1
- package/publications/report-builder-dashboard-builders.js +42 -1
- package/publications/report-builder-dashboard-builders.js.map +1 -1
- package/publications/report-builder-libraries.js +90 -1
- package/publications/report-builder-libraries.js.map +1 -1
- package/publications/report-builder-reports.js +50 -1
- package/publications/report-builder-reports.js.map +1 -1
- package/publications/super-admin.js +16 -1
- package/publications/super-admin.js.map +1 -1
- package/publications/user-groups.js +16 -1
- package/publications/user-groups.js.map +1 -1
- package/publications/user-guides.js +16 -1
- package/publications/user-guides.js.map +1 -1
- package/resolveio-server-app.js +176 -1
- package/resolveio-server-app.js.map +1 -1
- package/server-app.js +1159 -1
- package/server-app.js.map +1 -1
- package/util/common.js +632 -1
- package/util/common.js.map +1 -1
- package/util/schema-report-builder.js +454 -1
- package/util/schema-report-builder.js.map +1 -1
package/client-server-app.js
CHANGED
|
@@ -1,2 +1,52 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var serverConfig = require('./settings.json');
|
|
40
|
+
var resolveio_server_app_1 = require("./resolveio-server-app");
|
|
41
|
+
setImmediate(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
+
return __generator(this, function (_a) {
|
|
43
|
+
switch (_a.label) {
|
|
44
|
+
case 0: return [4 /*yield*/, resolveio_server_app_1.ResolveIOServer.create(serverConfig, [], 'ResolveIO Server Library', __dirname)];
|
|
45
|
+
case 1:
|
|
46
|
+
_a.sent();
|
|
47
|
+
return [2 /*return*/];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}); });
|
|
51
|
+
|
|
2
52
|
//# sourceMappingURL=client-server-app.js.map
|
package/client-server-app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/client-server-app.ts"],"names":[
|
|
1
|
+
{"version":3,"sources":["../../src/client-server-app.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAI,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC9C,+DAAyD;AAEzD,YAAY,CAAC;;;oBACT,qBAAM,sCAAe,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,EAAE,0BAA0B,EAAE,SAAS,CAAC,EAAA;;gBAArF,SAAqF,CAAC;;;;KACzF,CAAC,CAAC","file":"client-server-app.js","sourcesContent":["let serverConfig = require('./settings.json');\nimport { ResolveIOServer } from './resolveio-server-app';\n\nsetImmediate(async () => {\n await ResolveIOServer.create(serverConfig, [], 'ResolveIO Server Library', __dirname);\n});"]}
|
|
@@ -1,2 +1,52 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppStatus = void 0;
|
|
4
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
5
|
+
var resolveio_server_app_1 = require("../resolveio-server-app");
|
|
6
|
+
var schema = {
|
|
7
|
+
_id: {
|
|
8
|
+
type: String,
|
|
9
|
+
optional: true
|
|
10
|
+
},
|
|
11
|
+
__v: {
|
|
12
|
+
type: Number,
|
|
13
|
+
optional: true
|
|
14
|
+
},
|
|
15
|
+
updatedAt: {
|
|
16
|
+
type: Date,
|
|
17
|
+
optional: true
|
|
18
|
+
},
|
|
19
|
+
createdAt: {
|
|
20
|
+
type: Date,
|
|
21
|
+
optional: true
|
|
22
|
+
},
|
|
23
|
+
message: {
|
|
24
|
+
type: String
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.AppStatus = null;
|
|
28
|
+
initializeCollection();
|
|
29
|
+
function initializeCollection() {
|
|
30
|
+
if (resolveio_server_app_1.ResolveIOServer && resolveio_server_app_1.ResolveIOServer.getMainDB() && mongo_manager_1.MongoManagerModel) {
|
|
31
|
+
var model = mongo_manager_1.MongoManagerModel.create({
|
|
32
|
+
collectionName: 'app-statuses',
|
|
33
|
+
schema: schema,
|
|
34
|
+
useVersionCollection: false,
|
|
35
|
+
useReportBuilder: false,
|
|
36
|
+
reportBuilderLookupTables: [],
|
|
37
|
+
timestamps: true,
|
|
38
|
+
createLogs: false,
|
|
39
|
+
checkSchema: true,
|
|
40
|
+
collectionOptions: null,
|
|
41
|
+
bypassSession: true
|
|
42
|
+
});
|
|
43
|
+
exports.AppStatus = model.collection_main;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
setImmediate(function () {
|
|
47
|
+
initializeCollection();
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
2
52
|
//# sourceMappingURL=app-status.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/app-status.collection.ts"],"names":[
|
|
1
|
+
{"version":3,"sources":["../../src/collections/app-status.collection.ts"],"names":[],"mappings":";;;AACA,2DAAsF;AAEtF,gEAA0D;AAE1D,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;AAES,QAAA,SAAS,GAA2C,IAAI,CAAC;AAEpE,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,sCAAe,IAAI,sCAAe,CAAC,SAAS,EAAE,IAAI,iCAAiB,EAAE;QACxE,IAAM,KAAK,GAAG,iCAAiB,CAAC,MAAM,CAAiB;YACtD,cAAc,EAAE,cAAc;YAC9B,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;YACvB,aAAa,EAAE,IAAI;SACnB,CAAC,CAAC;QACH,iBAAS,GAAG,KAAK,CAAC,eAAe,CAAC;KAClC;SACI;QACJ,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;KACH;AACF,CAAC","file":"app-status.collection.js","sourcesContent":[" \nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { AppStatusModel } from '../models/app-status.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\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\nexport let AppStatus: MongoManagerCollection<AppStatusModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<AppStatusModel>({\n\t\t\tcollectionName: 'app-statuses',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null,\n\t\t\tbypassSession: true\n\t\t});\n\t\tAppStatus = model.collection_main;\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
|
|
@@ -1,2 +1,56 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Counters = void 0;
|
|
4
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
5
|
+
var resolveio_server_app_1 = require("../resolveio-server-app");
|
|
6
|
+
var schema = {
|
|
7
|
+
_id: {
|
|
8
|
+
type: String,
|
|
9
|
+
optional: true
|
|
10
|
+
},
|
|
11
|
+
__v: {
|
|
12
|
+
type: Number,
|
|
13
|
+
optional: true
|
|
14
|
+
},
|
|
15
|
+
updatedAt: {
|
|
16
|
+
type: Date,
|
|
17
|
+
optional: true
|
|
18
|
+
},
|
|
19
|
+
createdAt: {
|
|
20
|
+
type: Date,
|
|
21
|
+
optional: true
|
|
22
|
+
},
|
|
23
|
+
type: {
|
|
24
|
+
type: String
|
|
25
|
+
},
|
|
26
|
+
count: {
|
|
27
|
+
type: Number
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.Counters = null;
|
|
31
|
+
initializeCollection();
|
|
32
|
+
function initializeCollection() {
|
|
33
|
+
if (resolveio_server_app_1.ResolveIOServer && resolveio_server_app_1.ResolveIOServer.getMainDB() && mongo_manager_1.MongoManagerModel) {
|
|
34
|
+
var model = mongo_manager_1.MongoManagerModel.create({
|
|
35
|
+
collectionName: 'counters',
|
|
36
|
+
schema: schema,
|
|
37
|
+
useVersionCollection: false,
|
|
38
|
+
useReportBuilder: false,
|
|
39
|
+
reportBuilderLookupTables: [],
|
|
40
|
+
timestamps: true,
|
|
41
|
+
createLogs: false,
|
|
42
|
+
checkSchema: true,
|
|
43
|
+
collectionOptions: null,
|
|
44
|
+
skipCache: true,
|
|
45
|
+
bypassSession: true
|
|
46
|
+
});
|
|
47
|
+
exports.Counters = model.collection_main;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
setImmediate(function () {
|
|
51
|
+
initializeCollection();
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
2
56
|
//# sourceMappingURL=counter.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/counter.collection.ts"],"names":[
|
|
1
|
+
{"version":3,"sources":["../../src/collections/counter.collection.ts"],"names":[],"mappings":";;;AAAA,2DAAsF;AAEtF,gEAA0D;AAE1D,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;AAES,QAAA,QAAQ,GAAyC,IAAI,CAAC;AAEjE,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,sCAAe,IAAI,sCAAe,CAAC,SAAS,EAAE,IAAI,iCAAiB,EAAE;QACxE,IAAM,KAAK,GAAG,iCAAiB,CAAC,MAAM,CAAe;YACpD,cAAc,EAAE,UAAU;YAC1B,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;YACvB,SAAS,EAAE,IAAI;YACf,aAAa,EAAE,IAAI;SACnB,CAAC,CAAC;QACH,gBAAQ,GAAG,KAAK,CAAC,eAAe,CAAC;KACjC;SACI;QACJ,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;KACH;AACF,CAAC","file":"counter.collection.js","sourcesContent":["import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { CounterModel } from '../models/counter.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\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\nexport let Counters: MongoManagerCollection<CounterModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<CounterModel>({\n\t\t\tcollectionName: 'counters',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null,\n\t\t\tskipCache: true,\n\t\t\tbypassSession: true\n\t\t});\n\t\tCounters = model.collection_main;\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
|
|
@@ -1,2 +1,137 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.CronJobHistories = void 0;
|
|
40
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
41
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
42
|
+
var resolveio_server_app_1 = require("../resolveio-server-app");
|
|
43
|
+
var schema = {
|
|
44
|
+
_id: {
|
|
45
|
+
type: String,
|
|
46
|
+
optional: true
|
|
47
|
+
},
|
|
48
|
+
__v: {
|
|
49
|
+
type: Number,
|
|
50
|
+
optional: true
|
|
51
|
+
},
|
|
52
|
+
updatedAt: {
|
|
53
|
+
type: Date,
|
|
54
|
+
optional: true
|
|
55
|
+
},
|
|
56
|
+
createdAt: {
|
|
57
|
+
type: Date,
|
|
58
|
+
optional: true
|
|
59
|
+
},
|
|
60
|
+
name: {
|
|
61
|
+
type: String
|
|
62
|
+
},
|
|
63
|
+
reoccuring: {
|
|
64
|
+
type: Boolean
|
|
65
|
+
},
|
|
66
|
+
time_to_run: {
|
|
67
|
+
type: simpl_schema_1.default.oneOf(String, Date)
|
|
68
|
+
},
|
|
69
|
+
method_name: {
|
|
70
|
+
type: String
|
|
71
|
+
},
|
|
72
|
+
server_restart: {
|
|
73
|
+
type: Boolean
|
|
74
|
+
},
|
|
75
|
+
id_cronjob: {
|
|
76
|
+
type: String
|
|
77
|
+
},
|
|
78
|
+
passed: {
|
|
79
|
+
type: Boolean
|
|
80
|
+
},
|
|
81
|
+
error: {
|
|
82
|
+
type: String
|
|
83
|
+
},
|
|
84
|
+
date_scheduled: {
|
|
85
|
+
type: Date,
|
|
86
|
+
optional: true
|
|
87
|
+
},
|
|
88
|
+
date_start: {
|
|
89
|
+
type: Date
|
|
90
|
+
},
|
|
91
|
+
date_end: {
|
|
92
|
+
type: Date,
|
|
93
|
+
optional: true
|
|
94
|
+
},
|
|
95
|
+
date_next: {
|
|
96
|
+
type: Date,
|
|
97
|
+
optional: true
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
exports.CronJobHistories = null;
|
|
101
|
+
initializeCollection();
|
|
102
|
+
function initializeCollection() {
|
|
103
|
+
var _this = this;
|
|
104
|
+
if (resolveio_server_app_1.ResolveIOServer && resolveio_server_app_1.ResolveIOServer.getMainDB() && mongo_manager_1.MongoManagerModel) {
|
|
105
|
+
var model = mongo_manager_1.MongoManagerModel.create({
|
|
106
|
+
collectionName: 'cron-job-histories',
|
|
107
|
+
schema: schema,
|
|
108
|
+
useVersionCollection: false,
|
|
109
|
+
useReportBuilder: false,
|
|
110
|
+
reportBuilderLookupTables: [],
|
|
111
|
+
timestamps: true,
|
|
112
|
+
createLogs: false,
|
|
113
|
+
checkSchema: true,
|
|
114
|
+
collectionOptions: null,
|
|
115
|
+
skipCache: true,
|
|
116
|
+
bypassSession: true
|
|
117
|
+
});
|
|
118
|
+
exports.CronJobHistories = model.collection_main;
|
|
119
|
+
setImmediate(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
120
|
+
return __generator(this, function (_a) {
|
|
121
|
+
switch (_a.label) {
|
|
122
|
+
case 0: return [4 /*yield*/, exports.CronJobHistories.createIndex({ createdAt: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 7 })];
|
|
123
|
+
case 1:
|
|
124
|
+
_a.sent();
|
|
125
|
+
return [2 /*return*/];
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}); });
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
setImmediate(function () {
|
|
132
|
+
initializeCollection();
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
2
137
|
//# sourceMappingURL=cron-job-history.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/cron-job-history.collection.ts"],"names":[
|
|
1
|
+
{"version":3,"sources":["../../src/collections/cron-job-history.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAwC;AACxC,2DAAsF;AAEtF,gEAA0D;AAE1D,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,UAAU,EAAE;QACX,IAAI,EAAE,OAAO;KACb;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,sBAAY,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC;KACtC;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,cAAc,EAAE;QACf,IAAI,EAAE,OAAO;KACb;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,OAAO;KACb;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,cAAc,EAAE;QACf,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,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAES,QAAA,gBAAgB,GAAgD,IAAI,CAAC;AAEhF,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAA7B,iBA0BC;IAzBA,IAAI,sCAAe,IAAI,sCAAe,CAAC,SAAS,EAAE,IAAI,iCAAiB,EAAE;QACxE,IAAM,KAAK,GAAG,iCAAiB,CAAC,MAAM,CAAsB;YAC3D,cAAc,EAAE,oBAAoB;YACpC,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;YACvB,SAAS,EAAE,IAAI;YACf,aAAa,EAAE,IAAI;SACnB,CAAC,CAAC;QACH,wBAAgB,GAAG,KAAK,CAAC,eAAe,CAAC;QAEzC,YAAY,CAAC;;;4BACZ,qBAAM,wBAAgB,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAC,CAAC,EAAA;;wBAA1F,SAA0F,CAAC;;;;aAC3F,CAAC,CAAC;KACH;SACI;QACJ,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;KACH;AACF,CAAC","file":"cron-job-history.collection.js","sourcesContent":["import SimpleSchema from 'simpl-schema';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { CronJobHistoryModel } from '../models/cron-job-history.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\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: SimpleSchema.oneOf(String, Date)\n\t},\n\tmethod_name: {\n\t\ttype: String\n\t},\n\tserver_restart: {\n\t\ttype: Boolean\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\tdate_scheduled: {\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\tdate_next: {\n\t\ttype: Date,\n\t\toptional: true\n\t}\n};\n\nexport let CronJobHistories: MongoManagerCollection<CronJobHistoryModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<CronJobHistoryModel>({\n\t\t\tcollectionName: 'cron-job-histories',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null,\n\t\t\tskipCache: true,\n\t\t\tbypassSession: true\n\t\t});\n\t\tCronJobHistories = model.collection_main;\n\n\t\tsetImmediate(async () => {\n\t\t\tawait CronJobHistories.createIndex({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 7});\n\t\t});\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
|
|
@@ -1,2 +1,88 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CronJobs = void 0;
|
|
4
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
5
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
6
|
+
var resolveio_server_app_1 = require("../resolveio-server-app");
|
|
7
|
+
var schema = {
|
|
8
|
+
_id: {
|
|
9
|
+
type: String,
|
|
10
|
+
optional: true
|
|
11
|
+
},
|
|
12
|
+
__v: {
|
|
13
|
+
type: Number,
|
|
14
|
+
optional: true
|
|
15
|
+
},
|
|
16
|
+
updatedAt: {
|
|
17
|
+
type: Date,
|
|
18
|
+
optional: true
|
|
19
|
+
},
|
|
20
|
+
createdAt: {
|
|
21
|
+
type: Date,
|
|
22
|
+
optional: true
|
|
23
|
+
},
|
|
24
|
+
name: {
|
|
25
|
+
type: String
|
|
26
|
+
},
|
|
27
|
+
repeat: {
|
|
28
|
+
type: Boolean
|
|
29
|
+
},
|
|
30
|
+
time_to_run: {
|
|
31
|
+
type: simpl_schema_1.default.oneOf(String, Date)
|
|
32
|
+
},
|
|
33
|
+
method_run: {
|
|
34
|
+
type: String
|
|
35
|
+
},
|
|
36
|
+
method_run_data: {
|
|
37
|
+
type: Object,
|
|
38
|
+
blackbox: true,
|
|
39
|
+
optional: true
|
|
40
|
+
},
|
|
41
|
+
method_complete: {
|
|
42
|
+
type: String,
|
|
43
|
+
optional: true
|
|
44
|
+
},
|
|
45
|
+
method_complete_data: {
|
|
46
|
+
type: Object,
|
|
47
|
+
blackbox: true,
|
|
48
|
+
optional: true
|
|
49
|
+
},
|
|
50
|
+
running: {
|
|
51
|
+
type: Boolean
|
|
52
|
+
},
|
|
53
|
+
timezone: {
|
|
54
|
+
type: String
|
|
55
|
+
},
|
|
56
|
+
next_run: {
|
|
57
|
+
type: Date,
|
|
58
|
+
optional: true
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.CronJobs = null;
|
|
62
|
+
initializeCollection();
|
|
63
|
+
function initializeCollection() {
|
|
64
|
+
if (resolveio_server_app_1.ResolveIOServer && resolveio_server_app_1.ResolveIOServer.getMainDB() && mongo_manager_1.MongoManagerModel) {
|
|
65
|
+
var model = mongo_manager_1.MongoManagerModel.create({
|
|
66
|
+
collectionName: 'cron-jobs',
|
|
67
|
+
schema: schema,
|
|
68
|
+
useVersionCollection: false,
|
|
69
|
+
useReportBuilder: false,
|
|
70
|
+
reportBuilderLookupTables: [],
|
|
71
|
+
timestamps: true,
|
|
72
|
+
createLogs: false,
|
|
73
|
+
checkSchema: true,
|
|
74
|
+
collectionOptions: null,
|
|
75
|
+
skipCache: true,
|
|
76
|
+
bypassSession: true
|
|
77
|
+
});
|
|
78
|
+
exports.CronJobs = model.collection_main;
|
|
79
|
+
exports.CronJobs.createIndex({ running: 1 });
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
setImmediate(function () {
|
|
83
|
+
initializeCollection();
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
2
88
|
//# sourceMappingURL=cron-job.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/cron-job.collection.ts"],"names":[
|
|
1
|
+
{"version":3,"sources":["../../src/collections/cron-job.collection.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AACxC,2DAAsF;AAEtF,gEAA0D;AAE1D,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,MAAM,EAAE;QACP,IAAI,EAAE,OAAO;KACb;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,sBAAY,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC;KACtC;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;KACd;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,oBAAoB,EAAE;QACrB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,OAAO;KACb;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAES,QAAA,QAAQ,GAAyC,IAAI,CAAC;AAEjE,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,sCAAe,IAAI,sCAAe,CAAC,SAAS,EAAE,IAAI,iCAAiB,EAAE;QACxE,IAAM,KAAK,GAAG,iCAAiB,CAAC,MAAM,CAAe;YACpD,cAAc,EAAE,WAAW;YAC3B,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;YACvB,SAAS,EAAE,IAAI;YACf,aAAa,EAAE,IAAI;SACnB,CAAC,CAAC;QACH,gBAAQ,GAAG,KAAK,CAAC,eAAe,CAAC;QACjC,gBAAQ,CAAC,WAAW,CAAC,EAAC,OAAO,EAAE,CAAC,EAAC,CAAC,CAAC;KACnC;SACI;QACJ,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;KACH;AACF,CAAC","file":"cron-job.collection.js","sourcesContent":["import SimpleSchema from 'simpl-schema';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { CronJobModel } from '../models/cron-job.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\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: SimpleSchema.oneOf(String, Date)\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},\n\tnext_run: {\n\t\ttype: Date,\n\t\toptional: true\n\t}\n};\n\nexport let CronJobs: MongoManagerCollection<CronJobModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<CronJobModel>({\n\t\t\tcollectionName: 'cron-jobs',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null,\n\t\t\tskipCache: true,\n\t\t\tbypassSession: true\n\t\t});\n\t\tCronJobs = model.collection_main;\n\t\tCronJobs.createIndex({running: 1});\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
|
|
@@ -1,2 +1,99 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailHistories = void 0;
|
|
4
|
+
var mongo_manager_1 = require("../managers/mongo.manager");
|
|
5
|
+
var resolveio_server_app_1 = require("../resolveio-server-app");
|
|
6
|
+
var schema = {
|
|
7
|
+
_id: {
|
|
8
|
+
type: String,
|
|
9
|
+
optional: true
|
|
10
|
+
},
|
|
11
|
+
__v: {
|
|
12
|
+
type: Number,
|
|
13
|
+
optional: true
|
|
14
|
+
},
|
|
15
|
+
updatedAt: {
|
|
16
|
+
type: Date,
|
|
17
|
+
optional: true
|
|
18
|
+
},
|
|
19
|
+
createdAt: {
|
|
20
|
+
type: Date,
|
|
21
|
+
optional: true
|
|
22
|
+
},
|
|
23
|
+
date: {
|
|
24
|
+
type: Date
|
|
25
|
+
},
|
|
26
|
+
id_user: {
|
|
27
|
+
type: String
|
|
28
|
+
},
|
|
29
|
+
user: {
|
|
30
|
+
type: String
|
|
31
|
+
},
|
|
32
|
+
email: {
|
|
33
|
+
type: String
|
|
34
|
+
},
|
|
35
|
+
subject: {
|
|
36
|
+
type: String
|
|
37
|
+
},
|
|
38
|
+
text: {
|
|
39
|
+
type: String
|
|
40
|
+
},
|
|
41
|
+
html: {
|
|
42
|
+
type: String
|
|
43
|
+
},
|
|
44
|
+
attachments: {
|
|
45
|
+
type: Array
|
|
46
|
+
},
|
|
47
|
+
'attachments.$': {
|
|
48
|
+
type: Object,
|
|
49
|
+
blackbox: true
|
|
50
|
+
},
|
|
51
|
+
send_from: {
|
|
52
|
+
type: String
|
|
53
|
+
},
|
|
54
|
+
reply_to: {
|
|
55
|
+
type: String
|
|
56
|
+
},
|
|
57
|
+
status: {
|
|
58
|
+
type: String
|
|
59
|
+
},
|
|
60
|
+
error: {
|
|
61
|
+
type: String
|
|
62
|
+
},
|
|
63
|
+
processingAt: {
|
|
64
|
+
type: Date,
|
|
65
|
+
optional: true
|
|
66
|
+
},
|
|
67
|
+
completedAt: {
|
|
68
|
+
type: Date,
|
|
69
|
+
optional: true
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.EmailHistories = null;
|
|
73
|
+
initializeCollection();
|
|
74
|
+
function initializeCollection() {
|
|
75
|
+
if (resolveio_server_app_1.ResolveIOServer && resolveio_server_app_1.ResolveIOServer.getMainDB() && mongo_manager_1.MongoManagerModel) {
|
|
76
|
+
var model = mongo_manager_1.MongoManagerModel.create({
|
|
77
|
+
collectionName: 'email-histories',
|
|
78
|
+
schema: schema,
|
|
79
|
+
useVersionCollection: false,
|
|
80
|
+
useReportBuilder: false,
|
|
81
|
+
reportBuilderLookupTables: [],
|
|
82
|
+
timestamps: true,
|
|
83
|
+
createLogs: false,
|
|
84
|
+
checkSchema: true,
|
|
85
|
+
collectionOptions: null,
|
|
86
|
+
skipCache: true,
|
|
87
|
+
bypassSession: true
|
|
88
|
+
});
|
|
89
|
+
exports.EmailHistories = model.collection_main;
|
|
90
|
+
exports.EmailHistories.createIndex({ status: 1 });
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
setImmediate(function () {
|
|
94
|
+
initializeCollection();
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
2
99
|
//# sourceMappingURL=email-history.collection.js.map
|