@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.
Files changed (159) hide show
  1. package/collections/active-subscription.collection.js +2 -68
  2. package/collections/app-status.collection.js +2 -43
  3. package/collections/app-version.collection.js +2 -56
  4. package/collections/counter.collection.js +2 -73
  5. package/collections/cron-job-history.collection.js +2 -86
  6. package/collections/cron-job.collection.js +2 -89
  7. package/collections/file.collection.js +2 -73
  8. package/collections/flag.collection.js +2 -47
  9. package/collections/log.collection.js +2 -64
  10. package/collections/logged-in-users.collection.js +2 -70
  11. package/collections/method-call.collection.js +2 -44
  12. package/collections/method-response.collection.js +2 -48
  13. package/collections/queue-flag.collection.js +2 -41
  14. package/collections/queue-method.collection.js +2 -116
  15. package/collections/queue-response.collection.js +2 -78
  16. package/collections/support-ticket.collection.js +2 -146
  17. package/collections/user.collection.js +2 -108
  18. package/cron/cron.js +2 -160
  19. package/fixtures/cron-jobs.js +2 -72
  20. package/fixtures/init.js +2 -73
  21. package/http/auth.js +2 -472
  22. package/http/health.js +2 -8
  23. package/index.js +2 -125
  24. package/managers/cron.manager.js +2 -193
  25. package/managers/method.manager.js +2 -544
  26. package/managers/queue-method.manager.js +2 -239
  27. package/managers/subscription.manager.js +2 -700
  28. package/managers/support.manager.js +2 -208
  29. package/methods/accounts.js +2 -253
  30. package/methods/aws.js +2 -345
  31. package/methods/cloudconvert.js +2 -37
  32. package/methods/collections.js +2 -738
  33. package/methods/counters.js +2 -404
  34. package/methods/cron-jobs.js +2 -63
  35. package/methods/flags.js +2 -6
  36. package/methods/logs.js +2 -29
  37. package/methods/pdf.js +2 -303
  38. package/models/active-subscription.model.js +2 -2
  39. package/models/app-status.model.js +2 -2
  40. package/models/app-version.model.js +2 -2
  41. package/models/collection-document.model.js +2 -2
  42. package/models/counter.model.js +2 -2
  43. package/models/cron-job-history.model.js +2 -2
  44. package/models/cron-job.model.js +2 -2
  45. package/models/dialog.model.js +2 -2
  46. package/models/file.model.js +2 -2
  47. package/models/flag.model.js +2 -2
  48. package/models/log.model.js +2 -2
  49. package/models/logged-in-users.model.js +2 -2
  50. package/models/method-call.model.js +2 -2
  51. package/models/method-response.model.js +2 -2
  52. package/models/method.model.js +2 -2
  53. package/models/pagination.model.js +2 -20
  54. package/models/permission.model.js +2 -2
  55. package/models/queue-method.model.js +2 -2
  56. package/models/queue-response.model.js +2 -2
  57. package/models/select-data-label.model.js +2 -2
  58. package/models/server-response.model.js +2 -2
  59. package/models/subscription.model.js +2 -2
  60. package/models/support-method.model.js +2 -2
  61. package/models/support-ticket.model.js +2 -2
  62. package/models/user.model.js +2 -2
  63. package/package.json +2 -4
  64. package/publications/app-status.js +2 -14
  65. package/publications/app-version.js +2 -14
  66. package/publications/cron-jobs.js +2 -14
  67. package/publications/files.js +2 -71
  68. package/publications/flags.js +2 -23
  69. package/publications/logs.js +2 -26
  70. package/publications/method-calls.js +2 -14
  71. package/publications/method-responses.js +2 -14
  72. package/publications/super-admin.js +2 -21
  73. package/publications/support-tickets.js +2 -118
  74. package/server-app.js +2 -641
  75. package/support-methods/aws.js +2 -276
  76. package/support-methods/collections.js +2 -471
  77. package/support-methods/counters.js +2 -189
  78. package/support-methods/support.js +2 -19
  79. package/util/common.js +2 -334
  80. package/collections/active-subscription.collection.d.ts +0 -8
  81. package/collections/app-status.collection.d.ts +0 -8
  82. package/collections/app-version.collection.d.ts +0 -8
  83. package/collections/counter.collection.d.ts +0 -10
  84. package/collections/cron-job-history.collection.d.ts +0 -8
  85. package/collections/cron-job.collection.d.ts +0 -8
  86. package/collections/file.collection.d.ts +0 -10
  87. package/collections/flag.collection.d.ts +0 -8
  88. package/collections/log.collection.d.ts +0 -8
  89. package/collections/logged-in-users.collection.d.ts +0 -8
  90. package/collections/method-call.collection.d.ts +0 -7
  91. package/collections/method-response.collection.d.ts +0 -7
  92. package/collections/queue-flag.collection.d.ts +0 -8
  93. package/collections/queue-method.collection.d.ts +0 -8
  94. package/collections/queue-response.collection.d.ts +0 -8
  95. package/collections/support-ticket.collection.d.ts +0 -8
  96. package/collections/user.collection.d.ts +0 -9
  97. package/cron/cron.d.ts +0 -6
  98. package/fixtures/cron-jobs.d.ts +0 -2
  99. package/fixtures/init.d.ts +0 -2
  100. package/http/auth.d.ts +0 -3
  101. package/http/health.d.ts +0 -2
  102. package/index.d.ts +0 -17
  103. package/managers/cron.manager.d.ts +0 -17
  104. package/managers/method.manager.d.ts +0 -28
  105. package/managers/queue-method.manager.d.ts +0 -14
  106. package/managers/subscription.manager.d.ts +0 -27
  107. package/managers/support.manager.d.ts +0 -18
  108. package/methods/accounts.d.ts +0 -3
  109. package/methods/aws.d.ts +0 -3
  110. package/methods/cloudconvert.d.ts +0 -3
  111. package/methods/collections.d.ts +0 -3
  112. package/methods/counters.d.ts +0 -3
  113. package/methods/cron-jobs.d.ts +0 -3
  114. package/methods/flags.d.ts +0 -3
  115. package/methods/logs.d.ts +0 -3
  116. package/methods/pdf.d.ts +0 -3
  117. package/models/active-subscription.model.d.ts +0 -14
  118. package/models/app-status.model.d.ts +0 -5
  119. package/models/app-version.model.d.ts +0 -5
  120. package/models/collection-document.model.d.ts +0 -7
  121. package/models/counter.model.d.ts +0 -6
  122. package/models/cron-job-history.model.d.ts +0 -13
  123. package/models/cron-job.model.d.ts +0 -14
  124. package/models/dialog.model.d.ts +0 -24
  125. package/models/file.model.d.ts +0 -10
  126. package/models/flag.model.d.ts +0 -6
  127. package/models/log.model.d.ts +0 -12
  128. package/models/logged-in-users.model.d.ts +0 -10
  129. package/models/method-call.model.d.ts +0 -8
  130. package/models/method-response.model.d.ts +0 -9
  131. package/models/method.model.d.ts +0 -11
  132. package/models/notification.model.d.ts +0 -5
  133. package/models/notification.model.js +0 -2
  134. package/models/pagination.model.d.ts +0 -12
  135. package/models/permission.model.d.ts +0 -13
  136. package/models/queue-method.model.d.ts +0 -10
  137. package/models/queue-response.model.d.ts +0 -11
  138. package/models/select-data-label.model.d.ts +0 -10
  139. package/models/server-response.model.d.ts +0 -6
  140. package/models/subscription.model.d.ts +0 -31
  141. package/models/support-method.model.d.ts +0 -10
  142. package/models/support-ticket.model.d.ts +0 -40
  143. package/models/user.model.d.ts +0 -15
  144. package/publications/app-status.d.ts +0 -3
  145. package/publications/app-version.d.ts +0 -3
  146. package/publications/cron-jobs.d.ts +0 -3
  147. package/publications/files.d.ts +0 -3
  148. package/publications/flags.d.ts +0 -3
  149. package/publications/logs.d.ts +0 -3
  150. package/publications/method-calls.d.ts +0 -3
  151. package/publications/method-responses.d.ts +0 -3
  152. package/publications/super-admin.d.ts +0 -3
  153. package/publications/support-tickets.d.ts +0 -2
  154. package/server-app.d.ts +0 -34
  155. package/support-methods/aws.d.ts +0 -3
  156. package/support-methods/collections.d.ts +0 -3
  157. package/support-methods/counters.d.ts +0 -3
  158. package/support-methods/support.d.ts +0 -3
  159. 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
@@ -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
@@ -1,3 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadAppStatusPublications(subscriptionManager: SubscriptionManager): void;
3
- //# sourceMappingURL=app-status.d.ts.map
@@ -1,3 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadAppVersionPublications(subscriptionManager: SubscriptionManager): void;
3
- //# sourceMappingURL=app-version.d.ts.map
@@ -1,3 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadCronJobPublications(subscriptionManager: SubscriptionManager): void;
3
- //# sourceMappingURL=cron-jobs.d.ts.map
@@ -1,3 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadFilePublications(subscriptionManager: SubscriptionManager): void;
3
- //# sourceMappingURL=files.d.ts.map
@@ -1,3 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadFlagsPublications(subscriptionManager: SubscriptionManager): void;
3
- //# sourceMappingURL=flags.d.ts.map
@@ -1,3 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadLogPublications(subscriptionManager: SubscriptionManager): void;
3
- //# sourceMappingURL=logs.d.ts.map
@@ -1,3 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadMethodCallsPublications(subscriptionManager: SubscriptionManager): void;
3
- //# sourceMappingURL=method-calls.d.ts.map
@@ -1,3 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadMethodResponsePublications(subscriptionManager: SubscriptionManager): void;
3
- //# sourceMappingURL=method-responses.d.ts.map
@@ -1,3 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadSuperAdminPublications(subscriptionManager: SubscriptionManager): void;
3
- //# sourceMappingURL=super-admin.d.ts.map
@@ -1,2 +0,0 @@
1
- export declare function loadSupportTicketPublications(subscriptionManager: any): void;
2
- //# sourceMappingURL=support-tickets.d.ts.map
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
@@ -1,3 +0,0 @@
1
- import { SupportManager } from '../managers/support.manager';
2
- export declare function loadAWSMethods(supportManager: SupportManager): void;
3
- //# sourceMappingURL=aws.d.ts.map
@@ -1,3 +0,0 @@
1
- import { SupportManager } from '../managers/support.manager';
2
- export declare function loadSupportCollectionMethods(supportManager: SupportManager): void;
3
- //# sourceMappingURL=collections.d.ts.map
@@ -1,3 +0,0 @@
1
- import { SupportManager } from '../managers/support.manager';
2
- export declare function loadCounterMethods(supportManager: SupportManager): void;
3
- //# sourceMappingURL=counters.d.ts.map
@@ -1,3 +0,0 @@
1
- import { SupportManager } from '../managers/support.manager';
2
- export declare function loadSupportMethods(supportManager: SupportManager): void;
3
- //# sourceMappingURL=support.d.ts.map
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