@resolveio/server-lib 8.1.36 → 9.0.0

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/collections/app-status.collection.d.ts +2 -6
  2. package/collections/app-status.collection.js +4 -21
  3. package/collections/app-status.collection.js.map +1 -1
  4. package/collections/app-version.collection.d.ts +2 -6
  5. package/collections/app-version.collection.js +4 -34
  6. package/collections/app-version.collection.js.map +1 -1
  7. package/collections/counter.collection.d.ts +2 -6
  8. package/collections/counter.collection.js +4 -34
  9. package/collections/counter.collection.js.map +1 -1
  10. package/collections/cron-job-history.collection.d.ts +3 -7
  11. package/collections/cron-job-history.collection.js +5 -34
  12. package/collections/cron-job-history.collection.js.map +1 -1
  13. package/collections/cron-job.collection.d.ts +2 -6
  14. package/collections/cron-job.collection.js +4 -33
  15. package/collections/cron-job.collection.js.map +1 -1
  16. package/collections/email-history.collection.d.ts +2 -6
  17. package/collections/email-history.collection.js +4 -21
  18. package/collections/email-history.collection.js.map +1 -1
  19. package/collections/email-verified.collection.d.ts +2 -6
  20. package/collections/email-verified.collection.js +5 -22
  21. package/collections/email-verified.collection.js.map +1 -1
  22. package/collections/file.collection.d.ts +2 -6
  23. package/collections/file.collection.js +4 -26
  24. package/collections/file.collection.js.map +1 -1
  25. package/collections/flag.collection.d.ts +2 -6
  26. package/collections/flag.collection.js +4 -21
  27. package/collections/flag.collection.js.map +1 -1
  28. package/collections/log-method-latency.collection.d.ts +2 -6
  29. package/collections/log-method-latency.collection.js +7 -22
  30. package/collections/log-method-latency.collection.js.map +1 -1
  31. package/collections/log-subscription.collection.d.ts +2 -6
  32. package/collections/log-subscription.collection.js +9 -24
  33. package/collections/log-subscription.collection.js.map +1 -1
  34. package/collections/log.collection.d.ts +2 -6
  35. package/collections/log.collection.js +9 -25
  36. package/collections/log.collection.js.map +1 -1
  37. package/collections/logged-in-users.collection.d.ts +2 -6
  38. package/collections/logged-in-users.collection.js +5 -32
  39. package/collections/logged-in-users.collection.js.map +1 -1
  40. package/collections/method-call.collection.d.ts +2 -5
  41. package/collections/method-call.collection.js +5 -11
  42. package/collections/method-call.collection.js.map +1 -1
  43. package/collections/method-response.collection.d.ts +2 -5
  44. package/collections/method-response.collection.js +5 -11
  45. package/collections/method-response.collection.js.map +1 -1
  46. package/collections/monitor-cpu.collection.d.ts +2 -6
  47. package/collections/monitor-cpu.collection.js +9 -26
  48. package/collections/monitor-cpu.collection.js.map +1 -1
  49. package/collections/monitor-https-inbound.collection.d.ts +2 -6
  50. package/collections/monitor-https-inbound.collection.js +9 -26
  51. package/collections/monitor-https-inbound.collection.js.map +1 -1
  52. package/collections/monitor-https-outbound.collection.d.ts +2 -6
  53. package/collections/monitor-https-outbound.collection.js +11 -28
  54. package/collections/monitor-https-outbound.collection.js.map +1 -1
  55. package/collections/monitor-memory.collection.d.ts +2 -6
  56. package/collections/monitor-memory.collection.js +8 -25
  57. package/collections/monitor-memory.collection.js.map +1 -1
  58. package/collections/monitor-mongo.collection.d.ts +2 -6
  59. package/collections/monitor-mongo.collection.js +8 -25
  60. package/collections/monitor-mongo.collection.js.map +1 -1
  61. package/collections/notification.collection.d.ts +2 -6
  62. package/collections/notification.collection.js +4 -21
  63. package/collections/notification.collection.js.map +1 -1
  64. package/collections/queue-flag.collection.d.ts +2 -6
  65. package/collections/queue-flag.collection.js +5 -22
  66. package/collections/queue-flag.collection.js.map +1 -1
  67. package/collections/queue-method.collection.d.ts +2 -6
  68. package/collections/queue-method.collection.js +6 -77
  69. package/collections/queue-method.collection.js.map +1 -1
  70. package/collections/queue-response.collection.d.ts +2 -6
  71. package/collections/queue-response.collection.js +5 -34
  72. package/collections/queue-response.collection.js.map +1 -1
  73. package/collections/report-builder-dashboard-builder.collection.d.ts +2 -6
  74. package/collections/report-builder-dashboard-builder.collection.js +6 -35
  75. package/collections/report-builder-dashboard-builder.collection.js.map +1 -1
  76. package/collections/report-builder-library.collection.d.ts +2 -6
  77. package/collections/report-builder-library.collection.js +7 -36
  78. package/collections/report-builder-library.collection.js.map +1 -1
  79. package/collections/report-builder-report.collection.d.ts +2 -6
  80. package/collections/report-builder-report.collection.js +7 -36
  81. package/collections/report-builder-report.collection.js.map +1 -1
  82. package/collections/user-group.collection.d.ts +3 -6
  83. package/collections/user-group.collection.js +5 -38
  84. package/collections/user-group.collection.js.map +1 -1
  85. package/collections/user-guide.collection.d.ts +2 -6
  86. package/collections/user-guide.collection.js +4 -26
  87. package/collections/user-guide.collection.js.map +1 -1
  88. package/collections/user.collection.d.ts +3 -6
  89. package/collections/user.collection.js +36 -62
  90. package/collections/user.collection.js.map +1 -1
  91. package/fixtures/cron-jobs.js +5 -5
  92. package/fixtures/cron-jobs.js.map +1 -1
  93. package/fixtures/init.js +2 -2
  94. package/fixtures/init.js.map +1 -1
  95. package/http/auth.js +201 -185
  96. package/http/auth.js.map +1 -1
  97. package/index.d.ts +2 -1
  98. package/index.js +5 -6
  99. package/index.js.map +1 -1
  100. package/managers/cron.manager.js +6 -6
  101. package/managers/cron.manager.js.map +1 -1
  102. package/managers/method.manager.js +10 -10
  103. package/managers/method.manager.js.map +1 -1
  104. package/managers/mongo.manager.d.ts +102 -0
  105. package/managers/mongo.manager.js +514 -0
  106. package/managers/mongo.manager.js.map +1 -0
  107. package/managers/monitor.manager.js +6 -6
  108. package/managers/monitor.manager.js.map +1 -1
  109. package/managers/queue-method.manager.js +14 -14
  110. package/managers/queue-method.manager.js.map +1 -1
  111. package/managers/subscription.manager.js +9 -7
  112. package/managers/subscription.manager.js.map +1 -1
  113. package/methods/accounts.js +23 -21
  114. package/methods/accounts.js.map +1 -1
  115. package/methods/aws.js +7 -7
  116. package/methods/aws.js.map +1 -1
  117. package/methods/collections.js +112 -119
  118. package/methods/collections.js.map +1 -1
  119. package/methods/counters.js +5 -5
  120. package/methods/counters.js.map +1 -1
  121. package/methods/cron-jobs.js +2 -2
  122. package/methods/cron-jobs.js.map +1 -1
  123. package/methods/logs.js +8 -8
  124. package/methods/logs.js.map +1 -1
  125. package/methods/monitor.js +6 -6
  126. package/methods/monitor.js.map +1 -1
  127. package/methods/pdf.js +5 -5
  128. package/methods/pdf.js.map +1 -1
  129. package/methods/report-builder.js +2 -2
  130. package/methods/report-builder.js.map +1 -1
  131. package/models/report-builder.model.d.ts +1 -2
  132. package/models/report-builder.model.js.map +1 -1
  133. package/models/user.model.d.ts +9 -7
  134. package/models/user.model.js.map +1 -1
  135. package/package.json +26 -27
  136. package/public_api.js +1 -1
  137. package/publications/app-status.js +1 -1
  138. package/publications/app-status.js.map +1 -1
  139. package/publications/app-version.js +1 -1
  140. package/publications/app-version.js.map +1 -1
  141. package/publications/cron-jobs.js +2 -2
  142. package/publications/cron-jobs.js.map +1 -1
  143. package/publications/files.js +3 -3
  144. package/publications/files.js.map +1 -1
  145. package/publications/flags.js +1 -1
  146. package/publications/flags.js.map +1 -1
  147. package/publications/logs.js +3 -3
  148. package/publications/logs.js.map +1 -1
  149. package/publications/method-calls.js +1 -1
  150. package/publications/method-calls.js.map +1 -1
  151. package/publications/method-responses.js +1 -1
  152. package/publications/method-responses.js.map +1 -1
  153. package/publications/notifications.js +1 -1
  154. package/publications/notifications.js.map +1 -1
  155. package/publications/report-builder-dashboard-builders.js +2 -2
  156. package/publications/report-builder-dashboard-builders.js.map +1 -1
  157. package/publications/report-builder-libraries.js +3 -3
  158. package/publications/report-builder-libraries.js.map +1 -1
  159. package/publications/report-builder-reports.js +4 -4
  160. package/publications/report-builder-reports.js.map +1 -1
  161. package/publications/super-admin.js +1 -1
  162. package/publications/super-admin.js.map +1 -1
  163. package/publications/user-groups.js +1 -1
  164. package/publications/user-groups.js.map +1 -1
  165. package/publications/user-guides.js +1 -1
  166. package/publications/user-guides.js.map +1 -1
  167. package/server-app.d.ts +4 -1
  168. package/server-app.js +19 -28
  169. package/server-app.js.map +1 -1
  170. package/util/common.d.ts +2 -3
  171. package/util/common.js +16 -21
  172. package/util/common.js.map +1 -1
  173. package/util/schema-report-builder.js +5 -5
  174. package/util/schema-report-builder.js.map +1 -1
  175. package/managers/database.manager.d.ts +0 -6
  176. package/managers/database.manager.js +0 -15
  177. package/managers/database.manager.js.map +0 -1
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MonitorCPUVersions = exports.MonitorCPUs = void 0;
4
- var mongoose_1 = require("mongoose");
5
- var simpl_schema_1 = require("simpl-schema");
3
+ exports.MonitorCPUs = void 0;
6
4
  var index_1 = require("../index");
5
+ var mongo_manager_1 = require("../managers/mongo.manager");
7
6
  var schema = {
8
7
  _id: {
9
8
  type: String,
@@ -37,33 +36,17 @@ var schema = {
37
36
  type: Number
38
37
  }
39
38
  };
40
- var DefaultSchema = new mongoose_1.Schema(schema, {
41
- skipVersioning: true,
42
- versionKey: false,
43
- timestamps: true
44
- });
45
- DefaultSchema.index({ client: 1, instance: 1, date: 1 });
46
- DefaultSchema.index({ client: 1, date: 1 });
47
- DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
48
- DefaultSchema.index({ app: 1 });
49
- DefaultSchema.index({ system: 1 });
50
39
  exports.MonitorCPUs = null;
51
- exports.MonitorCPUVersions = null;
52
40
  initializeCollection();
53
41
  function initializeCollection() {
54
42
  if (index_1.ResolveIOServer.getMainDB()) {
55
- exports.MonitorCPUs = index_1.ResolveIOServer.getMainDB().model('monitor-cpus', DefaultSchema);
56
- exports.MonitorCPUs['simplschema'] = new simpl_schema_1.default(schema);
57
- schema._id = {
58
- type: mongoose_1.Schema.Types.Mixed
59
- };
60
- var VersionSchema = new mongoose_1.Schema(schema, {
61
- skipVersioning: true,
62
- versionKey: false,
63
- timestamps: true
64
- });
65
- exports.MonitorCPUs['versionCollection'] = 'monitor-cpus.versions';
66
- exports.MonitorCPUVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorCPUs['versionCollection'], VersionSchema);
43
+ var model = new mongo_manager_1.Model('monitor-cpus', schema, false, false);
44
+ exports.MonitorCPUs = model.collection_main;
45
+ exports.MonitorCPUs.createIndex({ client: 1, instance: 1, date: 1 });
46
+ exports.MonitorCPUs.createIndex({ client: 1, date: 1 });
47
+ exports.MonitorCPUs.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
48
+ exports.MonitorCPUs.createIndex({ app: 1 });
49
+ exports.MonitorCPUs.createIndex({ system: 1 });
67
50
  }
68
51
  else {
69
52
  setTimeout(function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/monitor-cpu.collection.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,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,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AACvD,aAAa,CAAC,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itor-cpu.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorCPUModel } from '../models/monitor-cpu.model';\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\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tapp: {\n\t\ttype: Number\n\t},\n\tsystem: {\n\t\ttype: Number\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, instance: 1, date: 1});\nDefaultSchema.index({client: 1, date: 1});\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({app: 1});\nDefaultSchema.index({system: 1});\n\ninterface ResolveIOModel extends MonitorCPUModel, Document {}\n\nexport let MonitorCPUs: Model<ResolveIOModel> = null;\nexport let MonitorCPUVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMonitorCPUs = ResolveIOServer.getMainDB().model('monitor-cpus', DefaultSchema);\n\n\t\tMonitorCPUs['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tMonitorCPUs['versionCollection'] = 'monitor-cpus.versions';\n\n\t\tMonitorCPUVersions = ResolveIOServer.getMainDB().model(MonitorCPUs['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/monitor-cpu.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAES,QAAA,WAAW,GAAgC,IAAI,CAAC;AAE3D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAkB,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAC/E,mBAAW,GAAG,KAAK,CAAC,eAAe,CAAC;QACpC,mBAAW,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QAC3D,mBAAW,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QAC9C,mBAAW,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QAC5E,mBAAW,CAAC,WAAW,CAAC,EAAC,GAAG,EAAE,CAAC,EAAC,CAAC,CAAC;QAClC,mBAAW,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;KACrC;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-cpu.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MonitorCPUModel } from '../models/monitor-cpu.model';\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\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tapp: {\n\t\ttype: Number\n\t},\n\tsystem: {\n\t\ttype: Number\n\t}\n};\n\nexport let MonitorCPUs: Collection<MonitorCPUModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MonitorCPUModel>('monitor-cpus', schema, false, false);\n\t\tMonitorCPUs = model.collection_main;\n\t\tMonitorCPUs.createIndex({client: 1, instance: 1, date: 1});\n\t\tMonitorCPUs.createIndex({client: 1, date: 1});\n\t\tMonitorCPUs.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tMonitorCPUs.createIndex({app: 1});\n\t\tMonitorCPUs.createIndex({system: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
@@ -1,7 +1,3 @@
1
- import { Model, Document } from 'mongoose';
1
+ import { Collection } from '../managers/mongo.manager';
2
2
  import { MonitorHTTPSInboundModel } from '../models/monitor-https-inbound.model';
3
- interface ResolveIOModel extends MonitorHTTPSInboundModel, Document {
4
- }
5
- export declare let MonitorHTTPSInbounds: Model<ResolveIOModel>;
6
- export declare let MonitorHTTPInboundVersions: Model<ResolveIOModel>;
7
- export {};
3
+ export declare let MonitorHTTPSInbounds: Collection<MonitorHTTPSInboundModel>;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MonitorHTTPInboundVersions = exports.MonitorHTTPSInbounds = void 0;
4
- var mongoose_1 = require("mongoose");
5
- var simpl_schema_1 = require("simpl-schema");
3
+ exports.MonitorHTTPSInbounds = void 0;
6
4
  var index_1 = require("../index");
5
+ var mongo_manager_1 = require("../managers/mongo.manager");
7
6
  var schema = {
8
7
  _id: {
9
8
  type: String,
@@ -46,33 +45,17 @@ var schema = {
46
45
  type: String
47
46
  }
48
47
  };
49
- var DefaultSchema = new mongoose_1.Schema(schema, {
50
- skipVersioning: true,
51
- versionKey: false,
52
- timestamps: true
53
- });
54
- DefaultSchema.index({ client: 1, instance: 1, date: 1, method: 1, url: 1 });
55
- DefaultSchema.index({ client: 1, date: 1, duration: 1 });
56
- DefaultSchema.index({ client: 1, date: 1, method: 1, url: 1 });
57
- DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
58
- DefaultSchema.index({ duration: 1 });
59
48
  exports.MonitorHTTPSInbounds = null;
60
- exports.MonitorHTTPInboundVersions = null;
61
49
  initializeCollection();
62
50
  function initializeCollection() {
63
51
  if (index_1.ResolveIOServer.getMainDB()) {
64
- exports.MonitorHTTPSInbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-inbounds', DefaultSchema);
65
- exports.MonitorHTTPSInbounds['simplschema'] = new simpl_schema_1.default(schema);
66
- schema._id = {
67
- type: mongoose_1.Schema.Types.Mixed
68
- };
69
- var VersionSchema = new mongoose_1.Schema(schema, {
70
- skipVersioning: true,
71
- versionKey: false,
72
- timestamps: true
73
- });
74
- exports.MonitorHTTPSInbounds['versionCollection'] = 'monitor-https-inbounds.versions';
75
- exports.MonitorHTTPInboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSInbounds['versionCollection'], VersionSchema);
52
+ var model = new mongo_manager_1.Model('monitor-https-inbounds', schema, false, false);
53
+ exports.MonitorHTTPSInbounds = model.collection_main;
54
+ exports.MonitorHTTPSInbounds.createIndex({ client: 1, instance: 1, date: 1, method: 1, url: 1 });
55
+ exports.MonitorHTTPSInbounds.createIndex({ client: 1, date: 1, duration: 1 });
56
+ exports.MonitorHTTPSInbounds.createIndex({ client: 1, date: 1, method: 1, url: 1 });
57
+ exports.MonitorHTTPSInbounds.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
58
+ exports.MonitorHTTPSInbounds.createIndex({ duration: 1 });
76
59
  }
77
60
  else {
78
61
  setTimeout(function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/monitor-https-inbound.collection.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,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,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IA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S,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,4BAAoB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,wBAAwB,EAAE,aAAa,CAAC,CAAC;QAElG,4BAAoB,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;QAE/D,MAAM,CAAC,GAAG,GAAG;YACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;YACtC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,4BAAoB,CAAC,mBAAmB,CAAC,GAAG,iCAAiC,CAAC;QAE9E,kCAA0B,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,4BAAoB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KACzH;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-https-inbound.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorHTTPSInboundModel } from '../models/monitor-https-inbound.model';\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\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\turl: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tcontentType: {\n\t\ttype: String\n\t},\n\trequestHeader: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, instance: 1, date: 1, method: 1, url: 1});\nDefaultSchema.index({client: 1, date: 1, duration: 1});\nDefaultSchema.index({client: 1, date: 1, method: 1, url: 1});\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({duration: 1});\n\ninterface ResolveIOModel extends MonitorHTTPSInboundModel, Document {}\n\nexport let MonitorHTTPSInbounds: Model<ResolveIOModel> = null;\nexport let MonitorHTTPInboundVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMonitorHTTPSInbounds = ResolveIOServer.getMainDB().model('monitor-https-inbounds', DefaultSchema);\n\n\t\tMonitorHTTPSInbounds['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tMonitorHTTPSInbounds['versionCollection'] = 'monitor-https-inbounds.versions';\n\n\t\tMonitorHTTPInboundVersions = ResolveIOServer.getMainDB().model(MonitorHTTPSInbounds['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/monitor-https-inbound.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE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E,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAC,CAAC,CAAC;QAC1E,4BAAoB,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QACrF,4BAAoB,CAAC,WAAW,CAAC,EAAC,QAAQ,EAAE,CAAC,EAAC,CAAC,CAAC;KAChD;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-https-inbound.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MonitorHTTPSInboundModel } from '../models/monitor-https-inbound.model';\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\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\turl: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tcontentType: {\n\t\ttype: String\n\t},\n\trequestHeader: {\n\t\ttype: String\n\t}\n};\n\nexport let MonitorHTTPSInbounds: Collection<MonitorHTTPSInboundModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MonitorHTTPSInboundModel>('monitor-https-inbounds', schema, false, false);\n\t\tMonitorHTTPSInbounds = model.collection_main;\n\t\tMonitorHTTPSInbounds.createIndex({client: 1, instance: 1, date: 1, method: 1, url: 1});\n\t\tMonitorHTTPSInbounds.createIndex({client: 1, date: 1, duration: 1});\n\t\tMonitorHTTPSInbounds.createIndex({client: 1, date: 1, method: 1, url: 1});\n\t\tMonitorHTTPSInbounds.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tMonitorHTTPSInbounds.createIndex({duration: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
@@ -1,7 +1,3 @@
1
- import { Model, Document } from 'mongoose';
1
+ import { Collection } from '../managers/mongo.manager';
2
2
  import { MonitorHTTPSOutboundModel } from '../models/monitor-https-outbound.model';
3
- interface ResolveIOModel extends MonitorHTTPSOutboundModel, Document {
4
- }
5
- export declare let MonitorHTTPSOutbounds: Model<ResolveIOModel>;
6
- export declare let MonitorHTTPSOutboundVersions: Model<ResolveIOModel>;
7
- export {};
3
+ export declare let MonitorHTTPSOutbounds: Collection<MonitorHTTPSOutboundModel>;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MonitorHTTPSOutboundVersions = exports.MonitorHTTPSOutbounds = void 0;
4
- var mongoose_1 = require("mongoose");
5
- var simpl_schema_1 = require("simpl-schema");
3
+ exports.MonitorHTTPSOutbounds = void 0;
6
4
  var index_1 = require("../index");
5
+ var mongo_manager_1 = require("../managers/mongo.manager");
7
6
  var schema = {
8
7
  _id: {
9
8
  type: String,
@@ -50,35 +49,19 @@ var schema = {
50
49
  blackbox: true
51
50
  }
52
51
  };
53
- var DefaultSchema = new mongoose_1.Schema(schema, {
54
- skipVersioning: true,
55
- versionKey: false,
56
- timestamps: true
57
- });
58
- DefaultSchema.index({ client: 1, instance: 1, date: 1, method: 1, url: 1, status: 1 });
59
- DefaultSchema.index({ client: 1, date: 1, duration: 1 });
60
- DefaultSchema.index({ client: 1, date: 1, method: 1, url: 1, status: 1 });
61
- DefaultSchema.index({ client: 1, date: 1, status: 1 });
62
- DefaultSchema.index({ client: 1, status: 1 });
63
- DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
64
- DefaultSchema.index({ duration: 1 });
65
52
  exports.MonitorHTTPSOutbounds = null;
66
- exports.MonitorHTTPSOutboundVersions = null;
67
53
  initializeCollection();
68
54
  function initializeCollection() {
69
55
  if (index_1.ResolveIOServer.getMainDB()) {
70
- exports.MonitorHTTPSOutbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-outbounds', DefaultSchema);
71
- exports.MonitorHTTPSOutbounds['simplschema'] = new simpl_schema_1.default(schema);
72
- schema._id = {
73
- type: mongoose_1.Schema.Types.Mixed
74
- };
75
- var VersionSchema = new mongoose_1.Schema(schema, {
76
- skipVersioning: true,
77
- versionKey: false,
78
- timestamps: true
79
- });
80
- exports.MonitorHTTPSOutbounds['versionCollection'] = 'monitor-https-outbounds.versions';
81
- exports.MonitorHTTPSOutboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSOutbounds['versionCollection'], VersionSchema);
56
+ var model = new mongo_manager_1.Model('monitor-https-outbounds', schema, false, false);
57
+ exports.MonitorHTTPSOutbounds = model.collection_main;
58
+ exports.MonitorHTTPSOutbounds.createIndex({ client: 1, instance: 1, date: 1, method: 1, url: 1, status: 1 });
59
+ exports.MonitorHTTPSOutbounds.createIndex({ client: 1, date: 1, duration: 1 });
60
+ exports.MonitorHTTPSOutbounds.createIndex({ client: 1, date: 1, method: 1, url: 1, status: 1 });
61
+ exports.MonitorHTTPSOutbounds.createIndex({ client: 1, date: 1, status: 1 });
62
+ exports.MonitorHTTPSOutbounds.createIndex({ client: 1, status: 1 });
63
+ exports.MonitorHTTPSOutbounds.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
64
+ exports.MonitorHTTPSOutbounds.createIndex({ duration: 1 });
82
65
  }
83
66
  else {
84
67
  setTimeout(function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/monitor-https-outbound.collection.ts"],"names":[],"m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H,6BAAqB,CAAC,mBAAmB,CAAC,GAAG,kCAAkC,CAAC;QAEhF,oCAA4B,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,6BAAqB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC5H;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-https-outbound.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorHTTPSOutboundModel } from '../models/monitor-https-outbound.model';\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\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\turl: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tstatus: {\n\t\ttype: String\n\t},\n\tcontentType: {\n\t\ttype: String\n\t},\n\trequestHeaders: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, instance: 1, date: 1, method: 1, url: 1, status: 1});\nDefaultSchema.index({client: 1, date: 1, duration: 1});\nDefaultSchema.index({client: 1, date: 1, method: 1, url: 1, status: 1});\nDefaultSchema.index({client: 1, date: 1, status: 1});\nDefaultSchema.index({client: 1, status: 1});\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({duration: 1});\n\ninterface ResolveIOModel extends MonitorHTTPSOutboundModel, Document {}\n\nexport let MonitorHTTPSOutbounds: Model<ResolveIOModel> = null;\nexport let MonitorHTTPSOutboundVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMonitorHTTPSOutbounds = ResolveIOServer.getMainDB().model('monitor-https-outbounds', DefaultSchema);\n\n\t\tMonitorHTTPSOutbounds['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tMonitorHTTPSOutbounds['versionCollection'] = 'monitor-https-outbounds.versions';\n\n\t\tMonitorHTTPSOutboundVersions = ResolveIOServer.getMainDB().model(MonitorHTTPSOutbounds['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/monitor-https-outbound.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,MA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AAC,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;QAC1D,6BAAqB,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QACtF,6BAAqB,CAAC,WAAW,CAAC,EAAC,QAAQ,EAAE,CAAC,EAAC,CAAC,CAAC;KACjD;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-https-outbound.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MonitorHTTPSOutboundModel } from '../models/monitor-https-outbound.model';\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\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\turl: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tstatus: {\n\t\ttype: String\n\t},\n\tcontentType: {\n\t\ttype: String\n\t},\n\trequestHeaders: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t}\n};\n\nexport let MonitorHTTPSOutbounds: Collection<MonitorHTTPSOutboundModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MonitorHTTPSOutboundModel>('monitor-https-outbounds', schema, false, false);\n\t\tMonitorHTTPSOutbounds = model.collection_main;\n\t\tMonitorHTTPSOutbounds.createIndex({client: 1, instance: 1, date: 1, method: 1, url: 1, status: 1});\n\t\tMonitorHTTPSOutbounds.createIndex({client: 1, date: 1, duration: 1});\n\t\tMonitorHTTPSOutbounds.createIndex({client: 1, date: 1, method: 1, url: 1, status: 1});\n\t\tMonitorHTTPSOutbounds.createIndex({client: 1, date: 1, status: 1});\n\t\tMonitorHTTPSOutbounds.createIndex({client: 1, status: 1});\n\t\tMonitorHTTPSOutbounds.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tMonitorHTTPSOutbounds.createIndex({duration: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
@@ -1,7 +1,3 @@
1
- import { Model, Document } from 'mongoose';
1
+ import { Collection } from '../managers/mongo.manager';
2
2
  import { MonitorMemoryModel } from '../models/monitor-memory.model';
3
- interface ResolveIOModel extends MonitorMemoryModel, Document {
4
- }
5
- export declare let MonitorMemorys: Model<ResolveIOModel>;
6
- export declare let MonitorMemoryVersions: Model<ResolveIOModel>;
7
- export {};
3
+ export declare let MonitorMemorys: Collection<MonitorMemoryModel>;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MonitorMemoryVersions = exports.MonitorMemorys = void 0;
4
- var mongoose_1 = require("mongoose");
5
- var simpl_schema_1 = require("simpl-schema");
3
+ exports.MonitorMemorys = void 0;
6
4
  var index_1 = require("../index");
5
+ var mongo_manager_1 = require("../managers/mongo.manager");
7
6
  var schema = {
8
7
  _id: {
9
8
  type: String,
@@ -49,32 +48,16 @@ var schema = {
49
48
  type: Number
50
49
  }
51
50
  };
52
- var DefaultSchema = new mongoose_1.Schema(schema, {
53
- skipVersioning: true,
54
- versionKey: false,
55
- timestamps: true
56
- });
57
- DefaultSchema.index({ client: 1, instance: 1, date: 1 });
58
- DefaultSchema.index({ client: 1, date: 1 });
59
- DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
60
- DefaultSchema.index({ physical_free: 1 });
61
51
  exports.MonitorMemorys = null;
62
- exports.MonitorMemoryVersions = null;
63
52
  initializeCollection();
64
53
  function initializeCollection() {
65
54
  if (index_1.ResolveIOServer.getMainDB()) {
66
- exports.MonitorMemorys = index_1.ResolveIOServer.getMainDB().model('monitor-memorys', DefaultSchema);
67
- exports.MonitorMemorys['simplschema'] = new simpl_schema_1.default(schema);
68
- schema._id = {
69
- type: mongoose_1.Schema.Types.Mixed
70
- };
71
- var VersionSchema = new mongoose_1.Schema(schema, {
72
- skipVersioning: true,
73
- versionKey: false,
74
- timestamps: true
75
- });
76
- exports.MonitorMemorys['versionCollection'] = 'monitor-memorys.versions';
77
- exports.MonitorMemoryVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMemorys['versionCollection'], VersionSchema);
55
+ var model = new mongo_manager_1.Model('monitor-memorys', schema, false, false);
56
+ exports.MonitorMemorys = model.collection_main;
57
+ exports.MonitorMemorys.createIndex({ client: 1, instance: 1, date: 1 });
58
+ exports.MonitorMemorys.createIndex({ client: 1, date: 1 });
59
+ exports.MonitorMemorys.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
60
+ exports.MonitorMemorys.createIndex({ physical_free: 1 });
78
61
  }
79
62
  else {
80
63
  setTimeout(function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/monitor-memory.collection.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,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;Q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e,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QAErF,sBAAc,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;QAEzD,MAAM,CAAC,GAAG,GAAG;YACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;YACtC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,sBAAc,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,CAAC;QAEjE,6BAAqB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC9G;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-memory.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorMemoryModel } from '../models/monitor-memory.model';\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\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tphysical_total: {\n\t\ttype: Number\n\t},\n\tphysical_used: {\n\t\ttype: Number\n\t},\n\tphysical_free: {\n\t\ttype: Number\n\t},\n\tvirtual: {\n\t\ttype: Number\n\t},\n\tprivate: {\n\t\ttype: Number\n\t},\n\tphysical: {\n\t\ttype: Number\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, instance: 1, date: 1});\nDefaultSchema.index({client: 1, date: 1});\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({physical_free: 1});\n\ninterface ResolveIOModel extends MonitorMemoryModel, Document {}\n\nexport let MonitorMemorys: Model<ResolveIOModel> = null;\nexport let MonitorMemoryVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMonitorMemorys = ResolveIOServer.getMainDB().model('monitor-memorys', DefaultSchema);\n\n\t\tMonitorMemorys['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tMonitorMemorys['versionCollection'] = 'monitor-memorys.versions';\n\n\t\tMonitorMemoryVersions = ResolveIOServer.getMainDB().model(MonitorMemorys['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/monitor-memory.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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,IA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xB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-memory.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MonitorMemoryModel } from '../models/monitor-memory.model';\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\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tphysical_total: {\n\t\ttype: Number\n\t},\n\tphysical_used: {\n\t\ttype: Number\n\t},\n\tphysical_free: {\n\t\ttype: Number\n\t},\n\tvirtual: {\n\t\ttype: Number\n\t},\n\tprivate: {\n\t\ttype: Number\n\t},\n\tphysical: {\n\t\ttype: Number\n\t}\n};\n\nexport let MonitorMemorys: Collection<MonitorMemoryModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MonitorMemoryModel>('monitor-memorys', schema, false, false);\n\t\tMonitorMemorys = model.collection_main;\n\t\tMonitorMemorys.createIndex({client: 1, instance: 1, date: 1});\n\t\tMonitorMemorys.createIndex({client: 1, date: 1});\n\t\tMonitorMemorys.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tMonitorMemorys.createIndex({physical_free: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
@@ -1,7 +1,3 @@
1
- import { Model, Document } from 'mongoose';
1
+ import { Collection } from '../managers/mongo.manager';
2
2
  import { MonitorMongoModel } from '../models/monitor-mongo.model';
3
- interface ResolveIOModel extends MonitorMongoModel, Document {
4
- }
5
- export declare let MonitorMongos: Model<ResolveIOModel>;
6
- export declare let MonitorMongoVersions: Model<ResolveIOModel>;
7
- export {};
3
+ export declare let MonitorMongos: Collection<MonitorMongoModel>;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MonitorMongoVersions = exports.MonitorMongos = void 0;
4
- var mongoose_1 = require("mongoose");
5
- var simpl_schema_1 = require("simpl-schema");
3
+ exports.MonitorMongos = void 0;
6
4
  var index_1 = require("../index");
5
+ var mongo_manager_1 = require("../managers/mongo.manager");
7
6
  var schema = {
8
7
  _id: {
9
8
  type: String,
@@ -43,32 +42,16 @@ var schema = {
43
42
  type: String
44
43
  }
45
44
  };
46
- var DefaultSchema = new mongoose_1.Schema(schema, {
47
- skipVersioning: true,
48
- versionKey: false,
49
- timestamps: true
50
- });
51
- DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
52
- DefaultSchema.index({ client: 1, date: 1, method: 1 });
53
- DefaultSchema.index({ client: 1, instance: 1, date: 1, method: 1 });
54
- DefaultSchema.index({ duration: 1 });
55
45
  exports.MonitorMongos = null;
56
- exports.MonitorMongoVersions = null;
57
46
  initializeCollection();
58
47
  function initializeCollection() {
59
48
  if (index_1.ResolveIOServer.getMainDB()) {
60
- exports.MonitorMongos = index_1.ResolveIOServer.getMainDB().model('monitor-mongos', DefaultSchema);
61
- exports.MonitorMongos['simplschema'] = new simpl_schema_1.default(schema);
62
- schema._id = {
63
- type: mongoose_1.Schema.Types.Mixed
64
- };
65
- var VersionSchema = new mongoose_1.Schema(schema, {
66
- skipVersioning: true,
67
- versionKey: false,
68
- timestamps: true
69
- });
70
- exports.MonitorMongos['versionCollection'] = 'monitor-mongos.versions';
71
- exports.MonitorMongoVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMongos['versionCollection'], VersionSchema);
49
+ var model = new mongo_manager_1.Model('monitor-mongos', schema, false, false);
50
+ exports.MonitorMongos = model.collection_main;
51
+ exports.MonitorMongos.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
52
+ exports.MonitorMongos.createIndex({ client: 1, date: 1, method: 1 });
53
+ exports.MonitorMongos.createIndex({ client: 1, instance: 1, date: 1, method: 1 });
54
+ exports.MonitorMongos.createIndex({ duration: 1 });
72
55
  }
73
56
  else {
74
57
  setTimeout(function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/monitor-mongo.collection.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,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,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,cAAc,EAAE;QACf,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,E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N;AACF,CAAC","file":"monitor-mongo.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorMongoModel } from '../models/monitor-mongo.model';\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\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tdoc_collection: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tquery: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({client: 1, date: 1, method: 1});\nDefaultSchema.index({client: 1, instance: 1, date: 1, method: 1});\nDefaultSchema.index({duration: 1});\n\ninterface ResolveIOModel extends MonitorMongoModel, Document {}\n\nexport let MonitorMongos: Model<ResolveIOModel> = null;\nexport let MonitorMongoVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMonitorMongos = ResolveIOServer.getMainDB().model('monitor-mongos', DefaultSchema);\n\n\t\tMonitorMongos['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tMonitorMongos['versionCollection'] = 'monitor-mongos.versions';\n\n\t\tMonitorMongoVersions = ResolveIOServer.getMainDB().model(MonitorMongos['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/monitor-mongo.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,cAAc,EAAE;QACf,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAES,QAAA,aAAa,GAAkC,IAAI,CAAC;AAE/D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAoB,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACnF,qBAAa,GAAG,KAAK,CAAC,eAAe,CAAC;QACtC,qBAAa,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QAC9E,qBAAa,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;QAC3D,qBAAa,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;QACxE,qBAAa,CAAC,WAAW,CAAC,EAAC,QAAQ,EAAE,CAAC,EAAC,CAAC,CAAC;KACzC;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-mongo.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { MonitorMongoModel } from '../models/monitor-mongo.model';\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\tinstance: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tdoc_collection: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tquery: {\n\t\ttype: String\n\t}\n};\n\nexport let MonitorMongos: Collection<MonitorMongoModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<MonitorMongoModel>('monitor-mongos', schema, false, false);\n\t\tMonitorMongos = model.collection_main;\n\t\tMonitorMongos.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tMonitorMongos.createIndex({client: 1, date: 1, method: 1});\n\t\tMonitorMongos.createIndex({client: 1, instance: 1, date: 1, method: 1});\n\t\tMonitorMongos.createIndex({duration: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
@@ -1,7 +1,3 @@
1
- import { Model, Document } from 'mongoose';
1
+ import { Collection } from '../managers/mongo.manager';
2
2
  import { NotificationModel } from '../models/notification.model';
3
- interface ResolveIOModel extends NotificationModel, Document {
4
- }
5
- export declare let Notifications: Model<ResolveIOModel>;
6
- export declare let NotificationVersions: Model<ResolveIOModel>;
7
- export {};
3
+ export declare let Notifications: Collection<NotificationModel>;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotificationVersions = exports.Notifications = void 0;
4
- var mongoose_1 = require("mongoose");
5
- var simpl_schema_1 = require("simpl-schema");
3
+ exports.Notifications = void 0;
6
4
  var index_1 = require("../index");
5
+ var mongo_manager_1 = require("../managers/mongo.manager");
7
6
  var schema = {
8
7
  _id: {
9
8
  type: String,
@@ -25,28 +24,12 @@ var schema = {
25
24
  type: String
26
25
  }
27
26
  };
28
- var DefaultSchema = new mongoose_1.Schema(schema, {
29
- skipVersioning: true,
30
- versionKey: false,
31
- timestamps: true
32
- });
33
27
  exports.Notifications = null;
34
- exports.NotificationVersions = null;
35
28
  initializeCollection();
36
29
  function initializeCollection() {
37
30
  if (index_1.ResolveIOServer.getMainDB()) {
38
- exports.Notifications = index_1.ResolveIOServer.getMainDB().model('notifications', DefaultSchema);
39
- exports.Notifications['simplschema'] = new simpl_schema_1.default(schema);
40
- schema._id = {
41
- type: mongoose_1.Schema.Types.Mixed
42
- };
43
- var VersionSchema = new mongoose_1.Schema(schema, {
44
- skipVersioning: true,
45
- versionKey: false,
46
- timestamps: true
47
- });
48
- exports.Notifications['versionCollection'] = 'notifications.versions';
49
- exports.NotificationVersions = index_1.ResolveIOServer.getMainDB().model(exports.Notifications['versionCollection'], VersionSchema);
31
+ var model = new mongo_manager_1.Model('notifications', schema, false, false);
32
+ exports.Notifications = model.collection_main;
50
33
  }
51
34
  else {
52
35
  setTimeout(function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/notification.collection.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,6CAAwC;AAExC,kCAA2C;AAE3C,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;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAIQ,QAAA,aAAa,GAA0B,IAAI,CAAC;AAC5C,QAAA,oBAAoB,GAA0B,IAAI,CAAC;AAE9D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,qBAAa,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;QAElF,qBAAa,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;QAExD,MAAM,CAAC,GAAG,GAAG;YACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;YACtC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,qBAAa,CAAC,mBAAmB,CAAC,GAAG,wBAAwB,CAAC;QAE9D,4BAAoB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,qBAAa,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC5G;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"notification.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { NotificationModel } from '../models/notification.model';\nimport { ResolveIOServer } from '../index';\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};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends NotificationModel, Document {}\n\nexport let Notifications: Model<ResolveIOModel> = null;\nexport let NotificationVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tNotifications = ResolveIOServer.getMainDB().model('notifications', DefaultSchema);\n\n\t\tNotifications['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tNotifications['versionCollection'] = 'notifications.versions';\n\n\t\tNotificationVersions = ResolveIOServer.getMainDB().model(Notifications['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/notification.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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;CACD,CAAC;AAES,QAAA,aAAa,GAAkC,IAAI,CAAC;AAE/D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAoB,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAClF,qBAAa,GAAG,KAAK,CAAC,eAAe,CAAC;KACtC;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"notification.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { NotificationModel } from '../models/notification.model';\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};\n\nexport let Notifications: Collection<NotificationModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<NotificationModel>('notifications', schema, false, false);\n\t\tNotifications = model.collection_main;\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
@@ -1,7 +1,3 @@
1
- import { Model, Document } from 'mongoose';
1
+ import { Collection } from '../managers/mongo.manager';
2
2
  import { CollectionDocument } from '../models/collection-document.model';
3
- interface ResolveIOModel extends CollectionDocument, Document {
4
- }
5
- export declare let QueueFlags: Model<ResolveIOModel>;
6
- export declare let QueueFlagVersions: Model<ResolveIOModel>;
7
- export {};
3
+ export declare let QueueFlags: Collection<CollectionDocument>;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QueueFlagVersions = exports.QueueFlags = void 0;
4
- var mongoose_1 = require("mongoose");
5
- var simpl_schema_1 = require("simpl-schema");
3
+ exports.QueueFlags = void 0;
6
4
  var index_1 = require("../index");
5
+ var mongo_manager_1 = require("../managers/mongo.manager");
7
6
  var schema = {
8
7
  _id: {
9
8
  type: String,
@@ -22,29 +21,13 @@ var schema = {
22
21
  optional: true
23
22
  }
24
23
  };
25
- var DefaultSchema = new mongoose_1.Schema(schema, {
26
- skipVersioning: true,
27
- versionKey: false,
28
- timestamps: true
29
- });
30
- DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 60 });
31
24
  exports.QueueFlags = null;
32
- exports.QueueFlagVersions = null;
33
25
  initializeCollection();
34
26
  function initializeCollection() {
35
27
  if (index_1.ResolveIOServer.getMainDB()) {
36
- exports.QueueFlags = index_1.ResolveIOServer.getMainDB().model('queue-flags', DefaultSchema);
37
- exports.QueueFlags['simplschema'] = new simpl_schema_1.default(schema);
38
- schema._id = {
39
- type: mongoose_1.Schema.Types.Mixed
40
- };
41
- var VersionSchema = new mongoose_1.Schema(schema, {
42
- skipVersioning: true,
43
- versionKey: false,
44
- timestamps: true
45
- });
46
- exports.QueueFlags['versionCollection'] = 'queue-flags.versions';
47
- exports.QueueFlagVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueFlags['versionCollection'], VersionSchema);
28
+ var model = new mongo_manager_1.Model('queue-flags', schema, false, false);
29
+ exports.QueueFlags = model.collection_main;
30
+ exports.QueueFlags.createIndex({ createdAt: 1 }, { expireAfterSeconds: 60 });
48
31
  }
49
32
  else {
50
33
  setTimeout(function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/queue-flag.collection.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,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;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,EAAC,CAAC,CAAC;AAInD,QAAA,UAAU,GAA0B,IAAI,CAAC;AACzC,QAAA,iBAAiB,GAA0B,IAAI,CAAC;AAE3D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,kBAAU,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;QAE7E,kBAAU,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;QAErD,MAAM,CAAC,GAAG,GAAG;YACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;YACtC,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,kBAAU,CAAC,mBAAmB,CAAC,GAAG,sBAAsB,CAAC;QAEzD,yBAAiB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,kBAAU,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KACtG;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"queue-flag.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { CollectionDocument } from '../models/collection-document.model';\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};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 60});\n\ninterface ResolveIOModel extends CollectionDocument, Document {}\n\nexport let QueueFlags: Model<ResolveIOModel> = null;\nexport let QueueFlagVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tQueueFlags = ResolveIOServer.getMainDB().model('queue-flags', DefaultSchema);\n\n\t\tQueueFlags['simplschema'] = new SimpleSchema(schema);\n\n\t\tschema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(schema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tQueueFlags['versionCollection'] = 'queue-flags.versions';\n\n\t\tQueueFlagVersions = ResolveIOServer.getMainDB().model(QueueFlags['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/queue-flag.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAA8D;AAG9D,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;CACD,CAAC;AAES,QAAA,UAAU,GAAmC,IAAI,CAAC;AAE7D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,IAAM,KAAK,GAAG,IAAI,qBAAK,CAAqB,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACjF,kBAAU,GAAG,KAAK,CAAC,eAAe,CAAC;QACnC,kBAAU,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,EAAC,CAAC,CAAC;KACjE;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"queue-flag.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { Collection, Model } from '../managers/mongo.manager';\nimport { CollectionDocument } from '../models/collection-document.model';\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};\n\nexport let QueueFlags: Collection<CollectionDocument> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tconst model = new Model<CollectionDocument>('queue-flags', schema, false, false);\n\t\tQueueFlags = model.collection_main;\n\t\tQueueFlags.createIndex({createdAt: 1}, {expireAfterSeconds: 60});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
@@ -1,7 +1,3 @@
1
- import { Model, Document } from 'mongoose';
1
+ import { Collection } from '../managers/mongo.manager';
2
2
  import { QueueMethodModel } from '../models/queue-method.model';
3
- interface ResolveIOModel extends QueueMethodModel, Document {
4
- }
5
- export declare let QueueMethods: Model<ResolveIOModel>;
6
- export declare let QueueMethodVersions: Model<ResolveIOModel>;
7
- export {};
3
+ export declare let QueueMethods: Collection<QueueMethodModel>;