@resolveio/server-lib 3.2.10 → 3.2.11

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 (177) hide show
  1. package/package.json +26 -26
  2. package/collections/active-subscription.collection.d.ts +0 -7
  3. package/collections/active-subscription.collection.js +0 -68
  4. package/collections/app-status.collection.d.ts +0 -7
  5. package/collections/app-status.collection.js +0 -43
  6. package/collections/app-version.collection.d.ts +0 -7
  7. package/collections/app-version.collection.js +0 -56
  8. package/collections/billing-logged-in-users.collection.d.ts +0 -7
  9. package/collections/billing-logged-in-users.collection.js +0 -73
  10. package/collections/counter.collection.d.ts +0 -9
  11. package/collections/counter.collection.js +0 -73
  12. package/collections/cron-job-history.collection.d.ts +0 -7
  13. package/collections/cron-job-history.collection.js +0 -86
  14. package/collections/cron-job.collection.d.ts +0 -7
  15. package/collections/cron-job.collection.js +0 -89
  16. package/collections/file.collection.d.ts +0 -9
  17. package/collections/file.collection.js +0 -73
  18. package/collections/flag.collection.d.ts +0 -7
  19. package/collections/flag.collection.js +0 -47
  20. package/collections/log.collection.d.ts +0 -7
  21. package/collections/log.collection.js +0 -65
  22. package/collections/logged-in-users.collection.d.ts +0 -7
  23. package/collections/logged-in-users.collection.js +0 -70
  24. package/collections/method-call.collection.d.ts +0 -6
  25. package/collections/method-call.collection.js +0 -44
  26. package/collections/method-response.collection.d.ts +0 -6
  27. package/collections/method-response.collection.js +0 -48
  28. package/collections/notification.collection.d.ts +0 -7
  29. package/collections/notification.collection.js +0 -43
  30. package/collections/queue-flag.collection.d.ts +0 -7
  31. package/collections/queue-flag.collection.js +0 -41
  32. package/collections/queue-method.collection.d.ts +0 -7
  33. package/collections/queue-method.collection.js +0 -119
  34. package/collections/queue-response.collection.d.ts +0 -7
  35. package/collections/queue-response.collection.js +0 -74
  36. package/collections/support-ticket.collection.d.ts +0 -7
  37. package/collections/support-ticket.collection.js +0 -200
  38. package/collections/user.collection.d.ts +0 -9
  39. package/collections/user.collection.js +0 -153
  40. package/cron/cron.d.ts +0 -5
  41. package/cron/cron.js +0 -160
  42. package/fixtures/cron-jobs.d.ts +0 -1
  43. package/fixtures/cron-jobs.js +0 -90
  44. package/fixtures/init.d.ts +0 -1
  45. package/fixtures/init.js +0 -67
  46. package/http/auth.d.ts +0 -2
  47. package/http/auth.js +0 -468
  48. package/http/health.d.ts +0 -1
  49. package/http/health.js +0 -8
  50. package/index.d.ts +0 -16
  51. package/index.js +0 -125
  52. package/managers/cron.manager.d.ts +0 -16
  53. package/managers/cron.manager.js +0 -202
  54. package/managers/database.manager.d.ts +0 -6
  55. package/managers/database.manager.js +0 -12
  56. package/managers/method.manager.d.ts +0 -28
  57. package/managers/method.manager.js +0 -584
  58. package/managers/queue-method.manager.d.ts +0 -13
  59. package/managers/queue-method.manager.js +0 -240
  60. package/managers/subscription.manager.d.ts +0 -28
  61. package/managers/subscription.manager.js +0 -803
  62. package/managers/support.manager.d.ts +0 -22
  63. package/managers/support.manager.js +0 -320
  64. package/methods/accounts.d.ts +0 -2
  65. package/methods/accounts.js +0 -253
  66. package/methods/aws.d.ts +0 -2
  67. package/methods/aws.js +0 -387
  68. package/methods/cloudconvert.d.ts +0 -2
  69. package/methods/cloudconvert.js +0 -37
  70. package/methods/collections.d.ts +0 -2
  71. package/methods/collections.js +0 -750
  72. package/methods/counters.d.ts +0 -2
  73. package/methods/counters.js +0 -107
  74. package/methods/cron-jobs.d.ts +0 -2
  75. package/methods/cron-jobs.js +0 -132
  76. package/methods/flags.d.ts +0 -2
  77. package/methods/flags.js +0 -6
  78. package/methods/logs.d.ts +0 -2
  79. package/methods/logs.js +0 -29
  80. package/methods/pdf.d.ts +0 -2
  81. package/methods/pdf.js +0 -303
  82. package/models/active-subscription.model.d.ts +0 -13
  83. package/models/active-subscription.model.js +0 -2
  84. package/models/app-status.model.d.ts +0 -4
  85. package/models/app-status.model.js +0 -2
  86. package/models/app-version.model.d.ts +0 -4
  87. package/models/app-version.model.js +0 -2
  88. package/models/billing-logged-in-users.model.d.ts +0 -7
  89. package/models/billing-logged-in-users.model.js +0 -2
  90. package/models/collection-document.model.d.ts +0 -6
  91. package/models/collection-document.model.js +0 -2
  92. package/models/counter.model.d.ts +0 -5
  93. package/models/counter.model.js +0 -2
  94. package/models/cron-job-history.model.d.ts +0 -12
  95. package/models/cron-job-history.model.js +0 -2
  96. package/models/cron-job.model.d.ts +0 -13
  97. package/models/cron-job.model.js +0 -2
  98. package/models/dialog.model.d.ts +0 -23
  99. package/models/dialog.model.js +0 -2
  100. package/models/file.model.d.ts +0 -9
  101. package/models/file.model.js +0 -2
  102. package/models/flag.model.d.ts +0 -5
  103. package/models/flag.model.js +0 -2
  104. package/models/log.model.d.ts +0 -11
  105. package/models/log.model.js +0 -2
  106. package/models/logged-in-users.model.d.ts +0 -9
  107. package/models/logged-in-users.model.js +0 -2
  108. package/models/method-call.model.d.ts +0 -7
  109. package/models/method-call.model.js +0 -2
  110. package/models/method-response.model.d.ts +0 -8
  111. package/models/method-response.model.js +0 -2
  112. package/models/method.model.d.ts +0 -10
  113. package/models/method.model.js +0 -2
  114. package/models/notification.model.d.ts +0 -4
  115. package/models/notification.model.js +0 -2
  116. package/models/pagination.model.d.ts +0 -11
  117. package/models/pagination.model.js +0 -20
  118. package/models/permission.model.d.ts +0 -12
  119. package/models/permission.model.js +0 -2
  120. package/models/queue-method.model.d.ts +0 -10
  121. package/models/queue-method.model.js +0 -2
  122. package/models/queue-response.model.d.ts +0 -10
  123. package/models/queue-response.model.js +0 -2
  124. package/models/select-data-label.model.d.ts +0 -9
  125. package/models/select-data-label.model.js +0 -2
  126. package/models/server-response.model.d.ts +0 -5
  127. package/models/server-response.model.js +0 -2
  128. package/models/subscription.model.d.ts +0 -30
  129. package/models/subscription.model.js +0 -2
  130. package/models/support-method.model.d.ts +0 -9
  131. package/models/support-method.model.js +0 -2
  132. package/models/support-ticket.model.d.ts +0 -61
  133. package/models/support-ticket.model.js +0 -2
  134. package/models/user.model.d.ts +0 -14
  135. package/models/user.model.js +0 -2
  136. package/private/email-templates/enrollment.html +0 -12
  137. package/private/email-templates/forgot-password.html +0 -12
  138. package/private/email-templates/support-ticket-deleted.html +0 -40
  139. package/private/email-templates/support-ticket-modified.html +0 -71
  140. package/private/email-templates/support-ticket.html +0 -71
  141. package/private/images/ResolveIO.png +0 -0
  142. package/publications/app-status.d.ts +0 -2
  143. package/publications/app-status.js +0 -14
  144. package/publications/app-version.d.ts +0 -2
  145. package/publications/app-version.js +0 -14
  146. package/publications/billing-logged-in-users.d.ts +0 -1
  147. package/publications/billing-logged-in-users.js +0 -63
  148. package/publications/cron-jobs.d.ts +0 -2
  149. package/publications/cron-jobs.js +0 -14
  150. package/publications/files.d.ts +0 -2
  151. package/publications/files.js +0 -71
  152. package/publications/flags.d.ts +0 -2
  153. package/publications/flags.js +0 -23
  154. package/publications/logs.d.ts +0 -2
  155. package/publications/logs.js +0 -26
  156. package/publications/method-calls.d.ts +0 -2
  157. package/publications/method-calls.js +0 -14
  158. package/publications/method-responses.d.ts +0 -2
  159. package/publications/method-responses.js +0 -14
  160. package/publications/notifications.d.ts +0 -2
  161. package/publications/notifications.js +0 -14
  162. package/publications/super-admin.d.ts +0 -2
  163. package/publications/super-admin.js +0 -21
  164. package/publications/support-tickets.d.ts +0 -1
  165. package/publications/support-tickets.js +0 -200
  166. package/server-app.d.ts +0 -35
  167. package/server-app.js +0 -636
  168. package/support-methods/aws.d.ts +0 -2
  169. package/support-methods/aws.js +0 -276
  170. package/support-methods/collections.d.ts +0 -2
  171. package/support-methods/collections.js +0 -471
  172. package/support-methods/counters.d.ts +0 -2
  173. package/support-methods/counters.js +0 -189
  174. package/support-methods/support.d.ts +0 -2
  175. package/support-methods/support.js +0 -236
  176. package/util/common.d.ts +0 -14
  177. package/util/common.js +0 -341
@@ -1,71 +0,0 @@
1
- <style type="text/css">
2
- * {
3
- font-size: 14px;
4
- font-family: Arial;
5
- background-color: white;
6
- }
7
- .header {
8
- font-weight: bold;
9
- min-width: 20px;
10
- }
11
- .td {
12
- border: 1px solid black;
13
- }
14
- .tr {
15
- border: 1px solid gray;
16
- }
17
- .tg {border-collapse:collapse;border-spacing:0;border-color:#999;}
18
- .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#999;color:#444;background-color:#F7FDFA;border-top-width:1px;border-bottom-width:1px;}
19
- .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#999;color:#fff;background-color:black;border-top-width:1px;border-bottom-width:1px;}
20
- .tg .tg-baqh{text-align:left;vertical-align:top}
21
- .tg .tg-yw4l{vertical-align:top;}
22
- </style>
23
-
24
- New support ticket #{{support_ticket_number_string}} has been created by {{user_created}}.
25
- <br><br>
26
- <div id="containter">
27
- <table class="tg">
28
- <thead>
29
- <tr>
30
- <th class="tg-yw4l" style="padding: 0; margin: 0; border-left: 1px solid #999;">
31
- <img src="{{logo}}" style="width: auto; height: 90px; background-color: white; margin-left: -10px; margin-bottom: -10px;" alt="Logo">
32
- </th>
33
- <th class="tg-yw4l" style="min-width: 800px; max-width: 800px; font-size: 20px; color: white; text-align: right; padding: 30px;">Support Ticket</th>
34
- </tr>
35
- </thead>
36
- <tbody>
37
- <tr>
38
- <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Support Ticket <br>Number</td>
39
- <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{support_ticket_number_string}}</td>
40
- </tr>
41
- <tr>
42
- <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Client</td>
43
- <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{client}}</td>
44
- </tr>
45
- <tr>
46
- <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Type</td>
47
- <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{type}}</td>
48
- </tr>
49
- <tr>
50
- <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Issue <br>Description</td>
51
- <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{issue}}</td>
52
- </tr>
53
- <tr>
54
- <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Priority</td>
55
- <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{priority}}</td>
56
- </tr>
57
- <tr>
58
- <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Status</td>
59
- <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{status}}</td>
60
- </tr>
61
- <tr>
62
- <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Substatus</td>
63
- <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{substatus}}</td>
64
- </tr>
65
- <tr>
66
- <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Date created</td>
67
- <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{date_created_string}}</td>
68
- </tr>
69
- </tbody>
70
- </table>
71
- </div>
Binary file
@@ -1,2 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadAppStatusPublications(subscriptionManager: SubscriptionManager): void;
@@ -1,14 +0,0 @@
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,2 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadAppVersionPublications(subscriptionManager: SubscriptionManager): void;
@@ -1,14 +0,0 @@
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 +0,0 @@
1
- export declare function loadBillingLoggedInUsersPublications(subscriptionManager: any): void;
@@ -1,63 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var simpl_schema_1 = require("simpl-schema");
4
- var billing_logged_in_users_collection_1 = require("../collections/billing-logged-in-users.collection");
5
- function loadBillingLoggedInUsersPublications(subscriptionManager) {
6
- subscriptionManager.publications({
7
- billingloggedinusers: {
8
- function: function () {
9
- return billing_logged_in_users_collection_1.BillingLoggedInUsers.find().sort({ date: -1 }).exec();
10
- },
11
- collections: ['billing-logged-in-users']
12
- },
13
- billingloggedinusersWithClientAndUserId: {
14
- function: function (client, id_user) {
15
- return billing_logged_in_users_collection_1.BillingLoggedInUsers.find({
16
- $and: [
17
- { client: client },
18
- { id_user: id_user }
19
- ]
20
- }).exec();
21
- },
22
- check: new simpl_schema_1.default({
23
- client: {
24
- type: String
25
- },
26
- id_user: {
27
- type: String
28
- }
29
- }),
30
- collections: ['billing-logged-in-users'],
31
- fetchFunction: function (document, client, id_user) {
32
- return document['id_user'] === id_user && document['client'] === client;
33
- }
34
- },
35
- billingloggedinusersWithClientAndDates: {
36
- function: function (client, date_start, date_end) {
37
- return billing_logged_in_users_collection_1.BillingLoggedInUsers.find({
38
- $and: [
39
- { client: client },
40
- { date: { $gte: date_start } },
41
- { date: { $lte: date_end } }
42
- ]
43
- }).exec();
44
- },
45
- check: new simpl_schema_1.default({
46
- client: {
47
- type: String
48
- },
49
- date_start: {
50
- type: Date
51
- },
52
- date_end: {
53
- type: Date
54
- }
55
- }),
56
- collections: ['billing-logged-in-users'],
57
- fetchFunction: function (document, date_start, date_end) {
58
- return document['date'].getTime() >= date_start && document['date'].getTime() <= date_end;
59
- }
60
- }
61
- });
62
- }
63
- exports.loadBillingLoggedInUsersPublications = loadBillingLoggedInUsersPublications;
@@ -1,2 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadCronJobPublications(subscriptionManager: SubscriptionManager): void;
@@ -1,14 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadFilePublications(subscriptionManager: SubscriptionManager): void;
@@ -1,71 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadFlagsPublications(subscriptionManager: SubscriptionManager): void;
@@ -1,23 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadLogPublications(subscriptionManager: SubscriptionManager): void;
@@ -1,26 +0,0 @@
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,2 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadMethodCallsPublications(subscriptionManager: SubscriptionManager): void;
@@ -1,14 +0,0 @@
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,2 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadMethodResponsePublications(subscriptionManager: SubscriptionManager): void;
@@ -1,14 +0,0 @@
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,2 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadNotificationPublications(subscriptionManager: SubscriptionManager): void;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var notification_collection_1 = require("../collections/notification.collection");
4
- function loadNotificationPublications(subscriptionManager) {
5
- subscriptionManager.publications({
6
- notifications: {
7
- function: function () {
8
- return notification_collection_1.Notifications.find({}).sort({ name: 1 }).exec();
9
- },
10
- collections: ['notifications']
11
- }
12
- });
13
- }
14
- exports.loadNotificationPublications = loadNotificationPublications;
@@ -1,2 +0,0 @@
1
- import { SubscriptionManager } from '../managers/subscription.manager';
2
- export declare function loadSuperAdminPublications(subscriptionManager: SubscriptionManager): void;
@@ -1,21 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export declare function loadSupportTicketPublications(subscriptionManager: any): void;
@@ -1,200 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (_) try {
17
- 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;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- Object.defineProperty(exports, "__esModule", { value: true });
38
- var support_ticket_collection_1 = require("../collections/support-ticket.collection");
39
- var simpl_schema_1 = require("simpl-schema");
40
- var pagination_model_1 = require("../models/pagination.model");
41
- var index_1 = require("../index");
42
- function loadSupportTicketPublications(subscriptionManager) {
43
- var _this = this;
44
- subscriptionManager.publications({
45
- supporttickets: {
46
- function: function () {
47
- return support_ticket_collection_1.SupportTickets.find({ client: index_1.ResolveIOServer.getClientName() }).sort({ type: 1 }).exec();
48
- },
49
- collections: ['support-tickets'],
50
- fetchFunction: function (document) {
51
- return document['client'] === index_1.ResolveIOServer.getClientName() ? true : false;
52
- }
53
- },
54
- supportticketWithId: {
55
- function: function (id_support_ticket) {
56
- return support_ticket_collection_1.SupportTickets.findById(id_support_ticket).exec();
57
- },
58
- check: new simpl_schema_1.default({
59
- id_support_ticket: {
60
- type: String
61
- }
62
- }),
63
- collections: ['support-tickets'],
64
- fetchFunction: function (document, id_support_ticket) {
65
- return document._id === id_support_ticket;
66
- }
67
- },
68
- supportticketDetails: {
69
- function: function (id_support_ticket) {
70
- return support_ticket_collection_1.SupportTickets.aggregate([
71
- {
72
- $match: { _id: id_support_ticket }
73
- },
74
- {
75
- $lookup: {
76
- from: 'files',
77
- localField: 'files',
78
- foreignField: '_id',
79
- as: 'dbFiles'
80
- }
81
- }
82
- ]).exec();
83
- },
84
- check: new simpl_schema_1.default({
85
- id_support_ticket: {
86
- type: String
87
- }
88
- }),
89
- collections: ['support-tickets', 'files'],
90
- preFunction: function (id_support_ticket) { return __awaiter(_this, void 0, void 0, function () {
91
- var support_ticket;
92
- return __generator(this, function (_a) {
93
- switch (_a.label) {
94
- case 0: return [4 /*yield*/, support_ticket_collection_1.SupportTickets.findOne({ _id: id_support_ticket })];
95
- case 1:
96
- support_ticket = _a.sent();
97
- if (!support_ticket) {
98
- return [2 /*return*/, {
99
- _id: '',
100
- support_ticket: []
101
- }];
102
- }
103
- return [2 /*return*/, {
104
- _id: support_ticket._id,
105
- files: support_ticket.files
106
- }];
107
- }
108
- });
109
- }); },
110
- fetchFunction: function (document, fetchData) {
111
- return document._id === fetchData['_id'] ||
112
- fetchData['files'].includes(document._id);
113
- }
114
- },
115
- supportticketsWithOptions: {
116
- function: function (options, search, filters) {
117
- return support_ticket_collection_1.SupportTickets.find(searchQuery.call(_this, search, filters)).sort(options.sort).limit(options.limit).skip(options.skip).select(options.fields).exec();
118
- },
119
- check: new simpl_schema_1.default({
120
- options: {
121
- type: pagination_model_1.PaginationOptionsSchema
122
- },
123
- search: {
124
- type: String,
125
- optional: true
126
- },
127
- filters: {
128
- type: Array,
129
- optional: true
130
- },
131
- 'filters.$': {
132
- type: Object
133
- },
134
- 'filters.$.prop': {
135
- type: String
136
- },
137
- 'filters.$.data': {
138
- type: String
139
- }
140
- }),
141
- collections: ['support-tickets']
142
- }
143
- });
144
- }
145
- exports.loadSupportTicketPublications = loadSupportTicketPublications;
146
- function searchQuery(search, filters) {
147
- if (!search && (!filters || !filters.length)) {
148
- return {};
149
- }
150
- else {
151
- var searchObj_1 = {};
152
- if (filters && filters.length) {
153
- searchObj_1['$and'] = [];
154
- filters.forEach(function (filter) {
155
- var _a;
156
- searchObj_1['$and'].push((_a = {}, _a[filter['prop']] = filter['data'], _a));
157
- });
158
- }
159
- if (search) {
160
- var searchRegEx = { '$regex': '.*' + (search || '') + '.*', '$options': 'i' };
161
- if (searchObj_1['$and']) {
162
- searchObj_1['$and'].push({
163
- $or: [
164
- {
165
- support_ticket_number_string: searchRegEx
166
- },
167
- {
168
- date_created_string: searchRegEx
169
- },
170
- {
171
- status: searchRegEx
172
- },
173
- {
174
- user_created: searchRegEx
175
- }
176
- ]
177
- });
178
- }
179
- else {
180
- searchObj_1 = {
181
- $or: [
182
- {
183
- support_ticket_number_string: searchRegEx
184
- },
185
- {
186
- date_created_string: searchRegEx
187
- },
188
- {
189
- status: searchRegEx
190
- },
191
- {
192
- user_created: searchRegEx
193
- }
194
- ]
195
- };
196
- }
197
- }
198
- return searchObj_1;
199
- }
200
- }
package/server-app.d.ts DELETED
@@ -1,35 +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 _msgQueue;
15
- private _msgQueueRunning;
16
- private _resolveioServer;
17
- private _subscriptionManager;
18
- private _methodManager;
19
- private _queueManager;
20
- private _cronManager;
21
- private _supportManager;
22
- constructor(mainServer: any, serverConfig: any, clientDir: any);
23
- getWS(id_ws: string): any;
24
- getWSList(): any[];
25
- getCronManager(): CronManager;
26
- getMethodManager(): MethodManager;
27
- getSubscriptionManager(): SubscriptionManager;
28
- getQueueManager(): QueueMethodManager;
29
- getSupportManager(): SupportManager;
30
- private createServer;
31
- private setUpMongoose;
32
- private setUpPassport;
33
- private listen;
34
- unsubscribeWS(ws: WebSocket): void;
35
- }