@resolveio/server-lib 1.0.0-rc2 → 1.0.0-rc21
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/active-subscription.collection.d.ts +8 -0
- package/collections/active-subscription.collection.js +68 -1
- package/collections/app-status.collection.d.ts +8 -0
- package/collections/app-status.collection.js +43 -1
- package/collections/app-version.collection.d.ts +8 -0
- package/collections/app-version.collection.js +56 -1
- package/collections/counter.collection.d.ts +10 -0
- package/collections/counter.collection.js +73 -1
- package/collections/cron-job-history.collection.d.ts +8 -0
- package/collections/cron-job-history.collection.js +86 -1
- package/collections/cron-job.collection.d.ts +8 -0
- package/collections/cron-job.collection.js +89 -1
- package/collections/file.collection.d.ts +10 -0
- package/collections/file.collection.js +73 -1
- package/collections/flag.collection.d.ts +8 -0
- package/collections/flag.collection.js +47 -1
- package/collections/log.collection.d.ts +8 -0
- package/collections/log.collection.js +64 -1
- package/collections/logged-in-users.collection.d.ts +8 -0
- package/collections/logged-in-users.collection.js +70 -1
- package/collections/method-call.collection.d.ts +7 -0
- package/collections/method-call.collection.js +44 -1
- package/collections/method-response.collection.d.ts +7 -0
- package/collections/method-response.collection.js +48 -1
- package/collections/queue-flag.collection.d.ts +8 -0
- package/collections/queue-flag.collection.js +41 -1
- package/collections/queue-method.collection.d.ts +8 -0
- package/collections/queue-method.collection.js +116 -1
- package/collections/queue-response.collection.d.ts +8 -0
- package/collections/queue-response.collection.js +78 -1
- package/collections/support-ticket.collection.d.ts +8 -0
- package/collections/support-ticket.collection.js +146 -1
- package/collections/user.collection.d.ts +9 -0
- package/collections/user.collection.js +108 -1
- package/cron/cron.d.ts +6 -0
- package/cron/cron.js +160 -1
- package/fixtures/cron-jobs.d.ts +2 -0
- package/fixtures/cron-jobs.js +72 -1
- package/fixtures/init.d.ts +2 -0
- package/fixtures/init.js +73 -1
- package/http/auth.d.ts +3 -0
- package/http/auth.js +472 -1
- package/http/health.d.ts +2 -0
- package/http/health.js +8 -1
- package/index.d.ts +15 -0
- package/index.js +123 -1
- package/managers/cron.manager.d.ts +17 -0
- package/managers/cron.manager.js +193 -1
- package/managers/method.manager.d.ts +27 -0
- package/managers/method.manager.js +513 -1
- package/managers/queue-method.manager.d.ts +14 -0
- package/managers/queue-method.manager.js +239 -1
- package/managers/subscription.manager.d.ts +27 -0
- package/managers/subscription.manager.js +700 -1
- package/managers/support.manager.d.ts +18 -0
- package/managers/support.manager.js +208 -1
- package/methods/accounts.d.ts +3 -0
- package/methods/accounts.js +253 -1
- package/methods/aws.d.ts +3 -0
- package/methods/aws.js +323 -1
- package/methods/cloudconvert.d.ts +3 -0
- package/methods/cloudconvert.js +37 -1
- package/methods/collections.d.ts +3 -0
- package/methods/collections.js +738 -1
- package/methods/counters.d.ts +3 -0
- package/methods/counters.js +404 -1
- package/methods/cron-jobs.d.ts +3 -0
- package/methods/cron-jobs.js +63 -1
- package/methods/flags.d.ts +3 -0
- package/methods/flags.js +6 -1
- package/methods/logs.d.ts +3 -0
- package/methods/logs.js +29 -1
- package/methods/pdf.d.ts +3 -0
- package/methods/pdf.js +303 -1
- package/models/active-subscription.model.d.ts +14 -0
- package/models/active-subscription.model.js +2 -1
- package/models/app-status.model.d.ts +5 -0
- package/models/app-status.model.js +2 -1
- package/models/app-version.model.d.ts +5 -0
- package/models/app-version.model.js +2 -1
- package/models/collection-document.model.d.ts +7 -0
- package/models/collection-document.model.js +2 -1
- package/models/counter.model.d.ts +6 -0
- package/models/counter.model.js +2 -1
- package/models/cron-job-history.model.d.ts +13 -0
- package/models/cron-job-history.model.js +2 -1
- package/models/cron-job.model.d.ts +14 -0
- package/models/cron-job.model.js +2 -1
- package/models/dialog.model.d.ts +24 -0
- package/models/dialog.model.js +2 -1
- package/models/file.model.d.ts +10 -0
- package/models/file.model.js +2 -1
- package/models/flag.model.d.ts +6 -0
- package/models/flag.model.js +2 -1
- package/models/log.model.d.ts +12 -0
- package/models/log.model.js +2 -1
- package/models/logged-in-users.model.d.ts +10 -0
- package/models/logged-in-users.model.js +2 -1
- package/models/method-call.model.d.ts +8 -0
- package/models/method-call.model.js +2 -1
- package/models/method-response.model.d.ts +9 -0
- package/models/method-response.model.js +2 -1
- package/models/method.model.d.ts +11 -0
- package/models/method.model.js +2 -1
- package/models/notification.model.d.ts +5 -0
- package/models/notification.model.js +2 -0
- package/models/pagination.model.d.ts +12 -0
- package/models/pagination.model.js +20 -1
- package/models/permission.model.d.ts +13 -0
- package/models/permission.model.js +2 -1
- package/models/queue-method.model.d.ts +10 -0
- package/models/queue-method.model.js +2 -1
- package/models/queue-response.model.d.ts +11 -0
- package/models/queue-response.model.js +2 -1
- package/models/select-data-label.model.d.ts +10 -0
- package/models/select-data-label.model.js +2 -1
- package/models/server-response.model.d.ts +6 -0
- package/models/server-response.model.js +2 -1
- package/models/subscription.model.d.ts +31 -0
- package/models/subscription.model.js +2 -1
- package/models/support-method.model.d.ts +10 -0
- package/models/support-method.model.js +2 -1
- package/models/support-ticket.model.d.ts +40 -0
- package/models/support-ticket.model.js +2 -1
- package/models/user.model.d.ts +15 -0
- package/models/user.model.js +2 -1
- package/package.json +5 -2
- package/publications/app-status.d.ts +3 -0
- package/publications/app-status.js +14 -1
- package/publications/app-version.d.ts +3 -0
- package/publications/app-version.js +14 -1
- package/publications/cron-jobs.d.ts +3 -0
- package/publications/cron-jobs.js +14 -1
- package/publications/files.d.ts +3 -0
- package/publications/files.js +71 -1
- package/publications/flags.d.ts +3 -0
- package/publications/flags.js +23 -1
- package/publications/logs.d.ts +3 -0
- package/publications/logs.js +26 -1
- package/publications/method-calls.d.ts +3 -0
- package/publications/method-calls.js +14 -1
- package/publications/method-responses.d.ts +3 -0
- package/publications/method-responses.js +14 -1
- package/publications/super-admin.d.ts +3 -0
- package/publications/super-admin.js +21 -1
- package/publications/support-tickets.d.ts +2 -0
- package/publications/support-tickets.js +118 -1
- package/server-app.d.ts +33 -0
- package/server-app.js +640 -1
- package/support-methods/aws.d.ts +3 -0
- package/support-methods/aws.js +276 -1
- package/support-methods/collections.d.ts +3 -0
- package/support-methods/collections.js +471 -1
- package/support-methods/counters.d.ts +3 -0
- package/support-methods/counters.js +189 -1
- package/support-methods/support.d.ts +3 -0
- package/support-methods/support.js +19 -1
- package/util/common.d.ts +15 -0
- package/util/common.js +334 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ModulePermissionModel {
|
|
2
|
+
name: string;
|
|
3
|
+
views: ModulePermissionViewModel[];
|
|
4
|
+
approval?: ModulePermissionApprovalModel;
|
|
5
|
+
}
|
|
6
|
+
export interface ModulePermissionViewModel {
|
|
7
|
+
link: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ModulePermissionApprovalModel {
|
|
11
|
+
type: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=permission.model.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CollectionDocument } from './collection-document.model';
|
|
2
|
+
export interface QueueMethodModel extends CollectionDocument {
|
|
3
|
+
method: string;
|
|
4
|
+
method_data: any[];
|
|
5
|
+
id_ws: string;
|
|
6
|
+
messageId: number;
|
|
7
|
+
id_user: string;
|
|
8
|
+
user: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=queue-method.model.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CollectionDocument } from './collection-document.model';
|
|
2
|
+
export interface QueueResponseModel extends CollectionDocument {
|
|
3
|
+
method: string;
|
|
4
|
+
method_data: any[];
|
|
5
|
+
id_ws: string;
|
|
6
|
+
messageId: number;
|
|
7
|
+
id_user: string;
|
|
8
|
+
user: string;
|
|
9
|
+
response: any;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=queue-response.model.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import SimpleSchema from 'simpl-schema';
|
|
2
|
+
export interface SubscriptionModel {
|
|
3
|
+
[key: string]: SubscriptionPubModel;
|
|
4
|
+
}
|
|
5
|
+
export interface SubscriptionPubModel {
|
|
6
|
+
check?: SimpleSchema;
|
|
7
|
+
preFunction?: (...parameters: any[]) => Promise<Object>;
|
|
8
|
+
function: (...parameters: any[]) => Promise<any | any[]>;
|
|
9
|
+
collections: string[];
|
|
10
|
+
fetchFunction?: (document: Object, ...parameters: any[]) => boolean;
|
|
11
|
+
ws_specific?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ActiveSubscriptionModel {
|
|
14
|
+
publication: string;
|
|
15
|
+
preSubscriptionData?: Object;
|
|
16
|
+
subscriptionData: any[];
|
|
17
|
+
collections: string[];
|
|
18
|
+
clients: ActiveSubscriptionClientModel[];
|
|
19
|
+
}
|
|
20
|
+
export interface ActiveSubscriptionClientModel {
|
|
21
|
+
id_user: string;
|
|
22
|
+
messageId: number;
|
|
23
|
+
id_socket: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ActiveClientSubscriptionModel {
|
|
26
|
+
messageId: number;
|
|
27
|
+
subscription: string;
|
|
28
|
+
parameters: any[];
|
|
29
|
+
subject: any;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=subscription.model.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import SimpleSchema from 'simpl-schema';
|
|
2
|
+
export interface SupportMethodModel {
|
|
3
|
+
[key: string]: SupportMethodAllModel;
|
|
4
|
+
}
|
|
5
|
+
export interface SupportMethodAllModel {
|
|
6
|
+
check?: SimpleSchema;
|
|
7
|
+
function: (...parameters: any[]) => Promise<any | any[]>;
|
|
8
|
+
skipValidation?: boolean;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=support-method.model.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { CollectionDocument } from './collection-document.model';
|
|
2
|
+
export interface SupportTicketModel extends CollectionDocument {
|
|
3
|
+
type: string;
|
|
4
|
+
priority: string;
|
|
5
|
+
issue: string;
|
|
6
|
+
support_ticket_number: number;
|
|
7
|
+
support_ticket_number_string: string;
|
|
8
|
+
status: SupportTicketStatus;
|
|
9
|
+
client: string;
|
|
10
|
+
id_client: string;
|
|
11
|
+
messages: SupportTicketMessageModel[];
|
|
12
|
+
date_created: Date;
|
|
13
|
+
date_created_string: string;
|
|
14
|
+
id_user_created: string;
|
|
15
|
+
user_created: string;
|
|
16
|
+
billable: boolean;
|
|
17
|
+
work_logs: SupportTicketWorkLogModel[];
|
|
18
|
+
date_investigation: Date;
|
|
19
|
+
date_closed: Date;
|
|
20
|
+
}
|
|
21
|
+
declare type SupportTicketStatus = 'Opened' | 'Investigating' | 'Awaiting Customer Interaction' | 'Resolved';
|
|
22
|
+
export interface SupportTicketMessageModel {
|
|
23
|
+
message: string;
|
|
24
|
+
id_user: string;
|
|
25
|
+
user: string;
|
|
26
|
+
date: Date;
|
|
27
|
+
type: SupportTicketMessageType;
|
|
28
|
+
}
|
|
29
|
+
declare type SupportTicketMessageType = 'ResolveIO' | 'Client';
|
|
30
|
+
export interface SupportTicketWorkLogModel {
|
|
31
|
+
note: string;
|
|
32
|
+
id_user: string;
|
|
33
|
+
user: string;
|
|
34
|
+
date_start: Date;
|
|
35
|
+
date_end?: Date;
|
|
36
|
+
time_spent?: number;
|
|
37
|
+
time_spent_string?: string;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=support-ticket.model.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CollectionDocument } from './collection-document.model';
|
|
2
|
+
export interface UserModel extends CollectionDocument {
|
|
3
|
+
attempts: number;
|
|
4
|
+
last: Date;
|
|
5
|
+
services?: any;
|
|
6
|
+
fullname: string;
|
|
7
|
+
username?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
roles?: string[];
|
|
10
|
+
active?: boolean;
|
|
11
|
+
readonly?: boolean;
|
|
12
|
+
phonenumber?: string;
|
|
13
|
+
other?: object;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=user.model.d.ts.map
|
package/models/user.model.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@resolveio/server-lib",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-rc21",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"package": "npm pack ./dist",
|
|
7
|
+
"package": "npm run build-prod && npm pack ./dist",
|
|
8
8
|
"start": "node_modules/.bin/forever -c node --max-old-space-size=800 index.js",
|
|
9
9
|
"server": "node_modules/gulp/bin/gulp.js mongo-start && node_modules/gulp/bin/gulp.js",
|
|
10
10
|
"postserver": "node_modules/gulp/bin/gulp.js mongo-stop",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/aws-sdk": "2.7.0",
|
|
46
|
+
"@types/core-js": "^2.5.0",
|
|
46
47
|
"@types/express": "4.16.0",
|
|
47
48
|
"@types/handlebars": "4.0.39",
|
|
48
49
|
"@types/imap": "0.8.29",
|
|
@@ -60,9 +61,11 @@
|
|
|
60
61
|
"gulp-nodemon": "2.4.1",
|
|
61
62
|
"gulp-rename": "1.4.0",
|
|
62
63
|
"gulp-shell": "0.6.5",
|
|
64
|
+
"gulp-sourcemaps": "^2.6.4",
|
|
63
65
|
"gulp-typescript": "5.0.0-alpha.3",
|
|
64
66
|
"gulp-uglify": "3.0.1",
|
|
65
67
|
"gulp-zip": "4.2.0",
|
|
68
|
+
"merge2": "^1.2.3",
|
|
66
69
|
"mkdirs": "0.0.2",
|
|
67
70
|
"typescript": "3.1.6"
|
|
68
71
|
}
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var app_status_collection_1 = require("../collections/app-status.collection");
|
|
4
|
+
function loadAppStatusPublications(subscriptionManager) {
|
|
5
|
+
subscriptionManager.publications({
|
|
6
|
+
appstatus: {
|
|
7
|
+
function: function () {
|
|
8
|
+
return app_status_collection_1.AppStatus.findOne().exec();
|
|
9
|
+
},
|
|
10
|
+
collections: ['app-statuses']
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.loadAppStatusPublications = loadAppStatusPublications;
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var app_version_collection_1 = require("../collections/app-version.collection");
|
|
4
|
+
function loadAppVersionPublications(subscriptionManager) {
|
|
5
|
+
subscriptionManager.publications({
|
|
6
|
+
appversion: {
|
|
7
|
+
function: function () {
|
|
8
|
+
return app_version_collection_1.AppVersions.findOne({}).exec();
|
|
9
|
+
},
|
|
10
|
+
collections: ['app-versions']
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.loadAppVersionPublications = loadAppVersionPublications;
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var cron_job_collection_1 = require("../collections/cron-job.collection");
|
|
4
|
+
function loadCronJobPublications(subscriptionManager) {
|
|
5
|
+
subscriptionManager.publications({
|
|
6
|
+
cronjobs: {
|
|
7
|
+
function: function () {
|
|
8
|
+
return cron_job_collection_1.CronJobs.find().sort({ name: 1 }).exec();
|
|
9
|
+
},
|
|
10
|
+
collections: ['cron-jobs']
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.loadCronJobPublications = loadCronJobPublications;
|
package/publications/files.js
CHANGED
|
@@ -1 +1,71 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
4
|
+
var file_collection_1 = require("./../collections/file.collection");
|
|
5
|
+
function loadFilePublications(subscriptionManager) {
|
|
6
|
+
subscriptionManager.publications({
|
|
7
|
+
fileWithId: {
|
|
8
|
+
function: function (id_file) {
|
|
9
|
+
return file_collection_1.Files.findById(id_file).sort({ name: 1 }).exec();
|
|
10
|
+
},
|
|
11
|
+
check: new simpl_schema_1.default({
|
|
12
|
+
id_file: {
|
|
13
|
+
type: String
|
|
14
|
+
}
|
|
15
|
+
}),
|
|
16
|
+
collections: ['files'],
|
|
17
|
+
fetchFunction: function (document, id_file) {
|
|
18
|
+
return document._id === id_file;
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
filesIn: {
|
|
22
|
+
function: function (id_files) {
|
|
23
|
+
return file_collection_1.Files.find({ _id: { $in: id_files } }).sort({ name: 1 }).exec();
|
|
24
|
+
},
|
|
25
|
+
check: new simpl_schema_1.default({
|
|
26
|
+
id_files: {
|
|
27
|
+
type: Array
|
|
28
|
+
},
|
|
29
|
+
'id_files.$': {
|
|
30
|
+
type: String
|
|
31
|
+
}
|
|
32
|
+
}),
|
|
33
|
+
collections: ['files'],
|
|
34
|
+
fetchFunction: function (document, id_files) {
|
|
35
|
+
return id_files.includes(document._id);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
supportFileWithId: {
|
|
39
|
+
function: function (id_file) {
|
|
40
|
+
return file_collection_1.SupportFiles.findById(id_file).sort({ name: 1 }).exec();
|
|
41
|
+
},
|
|
42
|
+
check: new simpl_schema_1.default({
|
|
43
|
+
id_file: {
|
|
44
|
+
type: String
|
|
45
|
+
}
|
|
46
|
+
}),
|
|
47
|
+
collections: ['files'],
|
|
48
|
+
fetchFunction: function (document, id_file) {
|
|
49
|
+
return document._id === id_file;
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
supportFilesIn: {
|
|
53
|
+
function: function (id_files) {
|
|
54
|
+
return file_collection_1.SupportFiles.find({ _id: { $in: id_files } }).sort({ name: 1 }).exec();
|
|
55
|
+
},
|
|
56
|
+
check: new simpl_schema_1.default({
|
|
57
|
+
id_files: {
|
|
58
|
+
type: Array
|
|
59
|
+
},
|
|
60
|
+
'id_files.$': {
|
|
61
|
+
type: String
|
|
62
|
+
}
|
|
63
|
+
}),
|
|
64
|
+
collections: ['files'],
|
|
65
|
+
fetchFunction: function (document, id_files) {
|
|
66
|
+
return id_files.includes(document._id);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
exports.loadFilePublications = loadFilePublications;
|
package/publications/flags.js
CHANGED
|
@@ -1 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
4
|
+
var flag_collection_1 = require("../collections/flag.collection");
|
|
5
|
+
function loadFlagsPublications(subscriptionManager) {
|
|
6
|
+
subscriptionManager.publications({
|
|
7
|
+
flagWithType: {
|
|
8
|
+
function: function (flagType) {
|
|
9
|
+
return flag_collection_1.Flags.findOne({ type: flagType }).exec();
|
|
10
|
+
},
|
|
11
|
+
check: new simpl_schema_1.default({
|
|
12
|
+
flagType: {
|
|
13
|
+
type: String
|
|
14
|
+
}
|
|
15
|
+
}),
|
|
16
|
+
collections: ['flags'],
|
|
17
|
+
fetchFunction: function (document, flagType) {
|
|
18
|
+
return document['type'] === flagType;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
exports.loadFlagsPublications = loadFlagsPublications;
|
package/publications/logs.js
CHANGED
|
@@ -1 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var simpl_schema_1 = require("simpl-schema");
|
|
4
|
+
var log_collection_1 = require("../collections/log.collection");
|
|
5
|
+
function loadLogPublications(subscriptionManager) {
|
|
6
|
+
subscriptionManager.publications({
|
|
7
|
+
logsWithType: {
|
|
8
|
+
function: function (type) {
|
|
9
|
+
if (type === 'all') {
|
|
10
|
+
return log_collection_1.Logs.find().sort({ date: -1 }).exec();
|
|
11
|
+
}
|
|
12
|
+
return log_collection_1.Logs.find({ type: type }).sort({ date: -1 }).exec();
|
|
13
|
+
},
|
|
14
|
+
check: new simpl_schema_1.default({
|
|
15
|
+
type: {
|
|
16
|
+
type: String
|
|
17
|
+
}
|
|
18
|
+
}),
|
|
19
|
+
collections: ['logs'],
|
|
20
|
+
fetchFunction: function (document, type) {
|
|
21
|
+
return document['type'] === type;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
exports.loadLogPublications = loadLogPublications;
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var method_call_collection_1 = require("../collections/method-call.collection");
|
|
4
|
+
function loadMethodCallsPublications(subscriptionManager) {
|
|
5
|
+
subscriptionManager.publications({
|
|
6
|
+
methodcalls: {
|
|
7
|
+
function: function () {
|
|
8
|
+
return method_call_collection_1.MethodCalls.find({}).exec();
|
|
9
|
+
},
|
|
10
|
+
collections: ['method-calls']
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.loadMethodCallsPublications = loadMethodCallsPublications;
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var method_response_collection_1 = require("../collections/method-response.collection");
|
|
4
|
+
function loadMethodResponsePublications(subscriptionManager) {
|
|
5
|
+
subscriptionManager.publications({
|
|
6
|
+
methodresponses: {
|
|
7
|
+
function: function () {
|
|
8
|
+
return method_response_collection_1.MethodResponses.find({}).exec();
|
|
9
|
+
},
|
|
10
|
+
collections: ['method-responses']
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
exports.loadMethodResponsePublications = loadMethodResponsePublications;
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var logged_in_users_collection_1 = require("../collections/logged-in-users.collection");
|
|
4
|
+
var active_subscription_collection_1 = require("../collections/active-subscription.collection");
|
|
5
|
+
function loadSuperAdminPublications(subscriptionManager) {
|
|
6
|
+
subscriptionManager.publications({
|
|
7
|
+
loggedInUsers: {
|
|
8
|
+
function: function () {
|
|
9
|
+
return logged_in_users_collection_1.LoggedInUsers.find({}).sort({ user: 1 }).exec();
|
|
10
|
+
},
|
|
11
|
+
collections: ['logged-in-users']
|
|
12
|
+
},
|
|
13
|
+
currentSubscriptions: {
|
|
14
|
+
function: function () {
|
|
15
|
+
return active_subscription_collection_1.ActiveSubscriptions.find({}).sort({ publication: 1 }).exec();
|
|
16
|
+
},
|
|
17
|
+
collections: ['active-subscriptions']
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
exports.loadSuperAdminPublications = loadSuperAdminPublications;
|