@resolveio/server-lib 1.0.0-rc28 → 1.0.0-rc4
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.js +2 -68
- package/collections/app-status.collection.js +2 -43
- package/collections/app-version.collection.js +2 -56
- package/collections/counter.collection.js +2 -73
- package/collections/cron-job-history.collection.js +2 -86
- package/collections/cron-job.collection.js +2 -89
- package/collections/file.collection.js +2 -73
- package/collections/flag.collection.js +2 -47
- package/collections/log.collection.js +2 -64
- package/collections/logged-in-users.collection.js +2 -70
- package/collections/method-call.collection.js +2 -44
- package/collections/method-response.collection.js +2 -48
- package/collections/queue-flag.collection.js +2 -41
- package/collections/queue-method.collection.js +2 -116
- package/collections/queue-response.collection.js +2 -78
- package/collections/support-ticket.collection.js +2 -146
- package/collections/user.collection.js +2 -108
- package/cron/cron.js +2 -160
- package/fixtures/cron-jobs.js +2 -72
- package/fixtures/init.js +2 -73
- package/http/auth.js +2 -472
- package/http/health.js +2 -8
- package/index.js +2 -125
- package/managers/cron.manager.js +2 -193
- package/managers/method.manager.js +2 -544
- package/managers/queue-method.manager.js +2 -239
- package/managers/subscription.manager.js +2 -700
- package/managers/support.manager.js +2 -208
- package/methods/accounts.js +2 -253
- package/methods/aws.js +2 -345
- package/methods/cloudconvert.js +2 -37
- package/methods/collections.js +2 -738
- package/methods/counters.js +2 -404
- package/methods/cron-jobs.js +2 -63
- package/methods/flags.js +2 -6
- package/methods/logs.js +2 -29
- package/methods/pdf.js +2 -303
- package/models/active-subscription.model.js +2 -2
- package/models/app-status.model.js +2 -2
- package/models/app-version.model.js +2 -2
- package/models/collection-document.model.js +2 -2
- package/models/counter.model.js +2 -2
- package/models/cron-job-history.model.js +2 -2
- package/models/cron-job.model.js +2 -2
- package/models/dialog.model.js +2 -2
- package/models/file.model.js +2 -2
- package/models/flag.model.js +2 -2
- package/models/log.model.js +2 -2
- package/models/logged-in-users.model.js +2 -2
- package/models/method-call.model.js +2 -2
- package/models/method-response.model.js +2 -2
- package/models/method.model.js +2 -2
- package/models/pagination.model.js +2 -20
- package/models/permission.model.js +2 -2
- package/models/queue-method.model.js +2 -2
- package/models/queue-response.model.js +2 -2
- package/models/select-data-label.model.js +2 -2
- package/models/server-response.model.js +2 -2
- package/models/subscription.model.js +2 -2
- package/models/support-method.model.js +2 -2
- package/models/support-ticket.model.js +2 -2
- package/models/user.model.js +2 -2
- package/package.json +2 -4
- package/publications/app-status.js +2 -14
- package/publications/app-version.js +2 -14
- package/publications/cron-jobs.js +2 -14
- package/publications/files.js +2 -71
- package/publications/flags.js +2 -23
- package/publications/logs.js +2 -26
- package/publications/method-calls.js +2 -14
- package/publications/method-responses.js +2 -14
- package/publications/super-admin.js +2 -21
- package/publications/support-tickets.js +2 -118
- package/server-app.js +2 -641
- package/support-methods/aws.js +2 -276
- package/support-methods/collections.js +2 -471
- package/support-methods/counters.js +2 -189
- package/support-methods/support.js +2 -19
- package/util/common.js +2 -334
- package/collections/active-subscription.collection.d.ts +0 -8
- package/collections/app-status.collection.d.ts +0 -8
- package/collections/app-version.collection.d.ts +0 -8
- package/collections/counter.collection.d.ts +0 -10
- package/collections/cron-job-history.collection.d.ts +0 -8
- package/collections/cron-job.collection.d.ts +0 -8
- package/collections/file.collection.d.ts +0 -10
- package/collections/flag.collection.d.ts +0 -8
- package/collections/log.collection.d.ts +0 -8
- package/collections/logged-in-users.collection.d.ts +0 -8
- package/collections/method-call.collection.d.ts +0 -7
- package/collections/method-response.collection.d.ts +0 -7
- package/collections/queue-flag.collection.d.ts +0 -8
- package/collections/queue-method.collection.d.ts +0 -8
- package/collections/queue-response.collection.d.ts +0 -8
- package/collections/support-ticket.collection.d.ts +0 -8
- package/collections/user.collection.d.ts +0 -9
- package/cron/cron.d.ts +0 -6
- package/fixtures/cron-jobs.d.ts +0 -2
- package/fixtures/init.d.ts +0 -2
- package/http/auth.d.ts +0 -3
- package/http/health.d.ts +0 -2
- package/index.d.ts +0 -17
- package/managers/cron.manager.d.ts +0 -17
- package/managers/method.manager.d.ts +0 -28
- package/managers/queue-method.manager.d.ts +0 -14
- package/managers/subscription.manager.d.ts +0 -27
- package/managers/support.manager.d.ts +0 -18
- package/methods/accounts.d.ts +0 -3
- package/methods/aws.d.ts +0 -3
- package/methods/cloudconvert.d.ts +0 -3
- package/methods/collections.d.ts +0 -3
- package/methods/counters.d.ts +0 -3
- package/methods/cron-jobs.d.ts +0 -3
- package/methods/flags.d.ts +0 -3
- package/methods/logs.d.ts +0 -3
- package/methods/pdf.d.ts +0 -3
- package/models/active-subscription.model.d.ts +0 -14
- package/models/app-status.model.d.ts +0 -5
- package/models/app-version.model.d.ts +0 -5
- package/models/collection-document.model.d.ts +0 -7
- package/models/counter.model.d.ts +0 -6
- package/models/cron-job-history.model.d.ts +0 -13
- package/models/cron-job.model.d.ts +0 -14
- package/models/dialog.model.d.ts +0 -24
- package/models/file.model.d.ts +0 -10
- package/models/flag.model.d.ts +0 -6
- package/models/log.model.d.ts +0 -12
- package/models/logged-in-users.model.d.ts +0 -10
- package/models/method-call.model.d.ts +0 -8
- package/models/method-response.model.d.ts +0 -9
- package/models/method.model.d.ts +0 -11
- package/models/notification.model.d.ts +0 -5
- package/models/notification.model.js +0 -2
- package/models/pagination.model.d.ts +0 -12
- package/models/permission.model.d.ts +0 -13
- package/models/queue-method.model.d.ts +0 -10
- package/models/queue-response.model.d.ts +0 -11
- package/models/select-data-label.model.d.ts +0 -10
- package/models/server-response.model.d.ts +0 -6
- package/models/subscription.model.d.ts +0 -31
- package/models/support-method.model.d.ts +0 -10
- package/models/support-ticket.model.d.ts +0 -40
- package/models/user.model.d.ts +0 -15
- package/publications/app-status.d.ts +0 -3
- package/publications/app-version.d.ts +0 -3
- package/publications/cron-jobs.d.ts +0 -3
- package/publications/files.d.ts +0 -3
- package/publications/flags.d.ts +0 -3
- package/publications/logs.d.ts +0 -3
- package/publications/method-calls.d.ts +0 -3
- package/publications/method-responses.d.ts +0 -3
- package/publications/super-admin.d.ts +0 -3
- package/publications/support-tickets.d.ts +0 -2
- package/server-app.d.ts +0 -34
- package/support-methods/aws.d.ts +0 -3
- package/support-methods/collections.d.ts +0 -3
- package/support-methods/counters.d.ts +0 -3
- package/support-methods/support.d.ts +0 -3
- package/util/common.d.ts +0 -15
|
@@ -1,31 +0,0 @@
|
|
|
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,10 +0,0 @@
|
|
|
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,40 +0,0 @@
|
|
|
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
|
package/models/user.model.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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/publications/files.d.ts
DELETED
package/publications/flags.d.ts
DELETED
package/publications/logs.d.ts
DELETED
package/server-app.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as WebSocket from 'ws';
|
|
2
|
-
import { CronManager } from './managers/cron.manager';
|
|
3
|
-
import { MethodManager } from './managers/method.manager';
|
|
4
|
-
import { SubscriptionManager } from './managers/subscription.manager';
|
|
5
|
-
import { SupportManager } from './managers/support.manager';
|
|
6
|
-
import { QueueMethodManager } from './managers/queue-method.manager';
|
|
7
|
-
export default class ResolveIOMainServer {
|
|
8
|
-
private _app;
|
|
9
|
-
private _server;
|
|
10
|
-
private _port;
|
|
11
|
-
private _wss;
|
|
12
|
-
private _serverConfig;
|
|
13
|
-
private _clientDir;
|
|
14
|
-
private _resolveioServer;
|
|
15
|
-
private _subscriptionManager;
|
|
16
|
-
private _methodManager;
|
|
17
|
-
private _queueManager;
|
|
18
|
-
private _cronManager;
|
|
19
|
-
private _supportManager;
|
|
20
|
-
constructor(mainServer: any, serverConfig: any, clientDir: any);
|
|
21
|
-
getWS(id_ws: string): any;
|
|
22
|
-
getWSList(): any[];
|
|
23
|
-
getCronManager(): CronManager;
|
|
24
|
-
getMethodManager(): MethodManager;
|
|
25
|
-
getSubscriptionManager(): SubscriptionManager;
|
|
26
|
-
getQueueManager(): QueueMethodManager;
|
|
27
|
-
getSupportManager(): SupportManager;
|
|
28
|
-
private createServer;
|
|
29
|
-
private setUpMongoose;
|
|
30
|
-
private setUpPassport;
|
|
31
|
-
private listen;
|
|
32
|
-
unsubscribeWS(ws: WebSocket): void;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=server-app.d.ts.map
|
package/support-methods/aws.d.ts
DELETED
package/util/common.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare function deepCopy(obj: any): any;
|
|
2
|
-
export declare function dateReviver(key: any, value: any): any;
|
|
3
|
-
export declare function getMongoUpdates(currDoc: any, modifiedDoc: any, incVersion: any): any;
|
|
4
|
-
export declare function getMongoMergeUpdatedDoc(f_doc: any, currentDoc: any, oldDoc: any): any;
|
|
5
|
-
export declare function mergeUpdates(...updatesToMerge: any[]): {
|
|
6
|
-
$set: {};
|
|
7
|
-
$unset: {};
|
|
8
|
-
$inc: {};
|
|
9
|
-
$push: {};
|
|
10
|
-
$pull: {};
|
|
11
|
-
};
|
|
12
|
-
export declare function getDeepDiff(doc1: any, doc2: any): any;
|
|
13
|
-
export declare function applyMongoUpdate(uDoc: any, delta: any): any;
|
|
14
|
-
export declare function getBinarySize(string: any): number;
|
|
15
|
-
//# sourceMappingURL=common.d.ts.map
|