@resolveio/server-lib 8.0.16 → 8.0.18

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 (90) hide show
  1. package/collections/app-status.collection.d.ts +2 -2
  2. package/collections/app-status.collection.js +24 -12
  3. package/collections/app-status.collection.js.map +1 -1
  4. package/collections/app-version.collection.d.ts +2 -2
  5. package/collections/app-version.collection.js +26 -14
  6. package/collections/app-version.collection.js.map +1 -1
  7. package/collections/counter.collection.d.ts +2 -2
  8. package/collections/counter.collection.js +26 -14
  9. package/collections/counter.collection.js.map +1 -1
  10. package/collections/cron-job-history.collection.d.ts +2 -2
  11. package/collections/cron-job-history.collection.js +25 -13
  12. package/collections/cron-job-history.collection.js.map +1 -1
  13. package/collections/cron-job.collection.d.ts +2 -2
  14. package/collections/cron-job.collection.js +25 -13
  15. package/collections/cron-job.collection.js.map +1 -1
  16. package/collections/email-history.collection.d.ts +2 -2
  17. package/collections/email-history.collection.js +24 -12
  18. package/collections/email-history.collection.js.map +1 -1
  19. package/collections/email-verified.collection.d.ts +2 -2
  20. package/collections/email-verified.collection.js +24 -12
  21. package/collections/email-verified.collection.js.map +1 -1
  22. package/collections/file.collection.d.ts +2 -2
  23. package/collections/file.collection.js +28 -16
  24. package/collections/file.collection.js.map +1 -1
  25. package/collections/flag.collection.d.ts +2 -2
  26. package/collections/flag.collection.js +24 -12
  27. package/collections/flag.collection.js.map +1 -1
  28. package/collections/log-method-latency.collection.d.ts +2 -2
  29. package/collections/log-method-latency.collection.js +23 -11
  30. package/collections/log-method-latency.collection.js.map +1 -1
  31. package/collections/log-subscription.collection.d.ts +2 -2
  32. package/collections/log-subscription.collection.js +23 -11
  33. package/collections/log-subscription.collection.js.map +1 -1
  34. package/collections/log.collection.d.ts +2 -2
  35. package/collections/log.collection.js +23 -11
  36. package/collections/log.collection.js.map +1 -1
  37. package/collections/logged-in-users.collection.d.ts +2 -2
  38. package/collections/logged-in-users.collection.js +24 -12
  39. package/collections/logged-in-users.collection.js.map +1 -1
  40. package/collections/method-call.collection.d.ts +1 -1
  41. package/collections/method-call.collection.js +13 -2
  42. package/collections/method-call.collection.js.map +1 -1
  43. package/collections/method-response.collection.d.ts +1 -1
  44. package/collections/method-response.collection.js +13 -2
  45. package/collections/method-response.collection.js.map +1 -1
  46. package/collections/monitor-cpu.collection.d.ts +2 -2
  47. package/collections/monitor-cpu.collection.js +24 -12
  48. package/collections/monitor-cpu.collection.js.map +1 -1
  49. package/collections/monitor-https-inbound.collection.d.ts +2 -2
  50. package/collections/monitor-https-inbound.collection.js +24 -12
  51. package/collections/monitor-https-inbound.collection.js.map +1 -1
  52. package/collections/monitor-https-outbound.collection.d.ts +2 -2
  53. package/collections/monitor-https-outbound.collection.js +24 -12
  54. package/collections/monitor-https-outbound.collection.js.map +1 -1
  55. package/collections/monitor-memory.collection.d.ts +2 -2
  56. package/collections/monitor-memory.collection.js +24 -12
  57. package/collections/monitor-memory.collection.js.map +1 -1
  58. package/collections/monitor-mongo.collection.d.ts +2 -2
  59. package/collections/monitor-mongo.collection.js +24 -12
  60. package/collections/monitor-mongo.collection.js.map +1 -1
  61. package/collections/notification.collection.d.ts +2 -2
  62. package/collections/notification.collection.js +24 -12
  63. package/collections/notification.collection.js.map +1 -1
  64. package/collections/queue-flag.collection.d.ts +2 -2
  65. package/collections/queue-flag.collection.js +24 -12
  66. package/collections/queue-flag.collection.js.map +1 -1
  67. package/collections/queue-method.collection.d.ts +2 -2
  68. package/collections/queue-method.collection.js +65 -53
  69. package/collections/queue-method.collection.js.map +1 -1
  70. package/collections/queue-response.collection.d.ts +2 -2
  71. package/collections/queue-response.collection.js +25 -13
  72. package/collections/queue-response.collection.js.map +1 -1
  73. package/collections/report-builder-library.collection.d.ts +2 -2
  74. package/collections/report-builder-library.collection.js +25 -13
  75. package/collections/report-builder-library.collection.js.map +1 -1
  76. package/collections/report-builder-report.collection.d.ts +2 -2
  77. package/collections/report-builder-report.collection.js +25 -13
  78. package/collections/report-builder-report.collection.js.map +1 -1
  79. package/collections/user-group.collection.d.ts +2 -2
  80. package/collections/user-group.collection.js +30 -18
  81. package/collections/user-group.collection.js.map +1 -1
  82. package/collections/user-guide.collection.d.ts +2 -2
  83. package/collections/user-guide.collection.js +28 -16
  84. package/collections/user-guide.collection.js.map +1 -1
  85. package/collections/user.collection.d.ts +3 -3
  86. package/collections/user.collection.js +29 -17
  87. package/collections/user.collection.js.map +1 -1
  88. package/http/auth.js.map +1 -1
  89. package/package.json +1 -1
  90. package/server-app.js.map +1 -1
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
2
2
  import { MonitorHTTPSOutboundModel } from '../models/monitor-https-outbound.model';
3
3
  interface ResolveIOModel extends MonitorHTTPSOutboundModel, Document {
4
4
  }
5
- export declare const MonitorHTTPSOutbounds: Model<ResolveIOModel>;
6
- export declare const MonitorHTTPSOutboundVersions: Model<ResolveIOModel>;
5
+ export declare let MonitorHTTPSOutbounds: Model<ResolveIOModel>;
6
+ export declare let MonitorHTTPSOutboundVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -60,17 +60,29 @@ DefaultSchema.index({ client: 1, date: 1, method: 1, url: 1, status: 1 });
60
60
  DefaultSchema.index({ client: 1, date: 1, status: 1 });
61
61
  DefaultSchema.index({ client: 1, status: 1 });
62
62
  DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
63
- exports.MonitorHTTPSOutbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-outbounds', DefaultSchema);
64
- exports.MonitorHTTPSOutbounds['simplschema'] = new simpl_schema_1.default(schema);
65
- schema._id = {
66
- type: mongoose_1.Schema.Types.Mixed
67
- };
68
- var VersionSchema = new mongoose_1.Schema(schema, {
69
- skipVersioning: true,
70
- versionKey: false,
71
- timestamps: true
72
- });
73
- exports.MonitorHTTPSOutbounds['versionCollection'] = 'monitor-https-outbounds.versions';
74
- exports.MonitorHTTPSOutboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSOutbounds['versionCollection'], VersionSchema);
63
+ exports.MonitorHTTPSOutbounds = null;
64
+ exports.MonitorHTTPSOutboundVersions = null;
65
+ initializeCollection();
66
+ function initializeCollection() {
67
+ if (index_1.ResolveIOServer.getMainDB()) {
68
+ exports.MonitorHTTPSOutbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-outbounds', DefaultSchema);
69
+ exports.MonitorHTTPSOutbounds['simplschema'] = new simpl_schema_1.default(schema);
70
+ schema._id = {
71
+ type: mongoose_1.Schema.Types.Mixed
72
+ };
73
+ var VersionSchema = new mongoose_1.Schema(schema, {
74
+ skipVersioning: true,
75
+ versionKey: false,
76
+ timestamps: true
77
+ });
78
+ exports.MonitorHTTPSOutbounds['versionCollection'] = 'monitor-https-outbounds.versions';
79
+ exports.MonitorHTTPSOutboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSOutbounds['versionCollection'], VersionSchema);
80
+ }
81
+ else {
82
+ setTimeout(function () {
83
+ initializeCollection();
84
+ }, 0);
85
+ }
86
+ }
75
87
 
76
88
  //# sourceMappingURL=monitor-https-outbound.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/monitor-https-outbound.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,IA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,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;AAG3D,QAAA,qBAAqB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,yBAAyB,EAAE,aAAa,CAAC,CAAC;AAExI,6BAAqB,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAEhE,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,6BAAqB,CAAC,mBAAmB,CAAC,GAAG,kCAAkC,CAAC;AAEnE,QAAA,4BAA4B,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,6BAAqB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,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});\n\ninterface ResolveIOModel extends MonitorHTTPSOutboundModel, Document {}\nexport const MonitorHTTPSOutbounds: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-https-outbounds', DefaultSchema);\n\nMonitorHTTPSOutbounds['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorHTTPSOutbounds['versionCollection'] = 'monitor-https-outbounds.versions';\n\nexport const MonitorHTTPSOutboundVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorHTTPSOutbounds['versionCollection'], VersionSchema);"]}
1
+ {"version":3,"sources":["../../src/collections/monitor-https-outbound.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,EAA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AAC;AACrD,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;AAC5C,aAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;AAI7D,QAAA,qBAAqB,GAA0B,IAAI,CAAC;AACpD,QAAA,4BAA4B,GAA0B,IAAI,CAAC;AAEtE,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,6BAAqB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,yBAAyB,EAAE,aAAa,CAAC,CAAC;QAEpG,6BAAqB,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;QAEhE,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,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});\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}"]}
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
2
2
  import { MonitorMemoryModel } from '../models/monitor-memory.model';
3
3
  interface ResolveIOModel extends MonitorMemoryModel, Document {
4
4
  }
5
- export declare const MonitorMemorys: Model<ResolveIOModel>;
6
- export declare const MonitorMemoryVersions: Model<ResolveIOModel>;
5
+ export declare let MonitorMemorys: Model<ResolveIOModel>;
6
+ export declare let MonitorMemoryVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -56,17 +56,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
56
56
  DefaultSchema.index({ client: 1, instance: 1, date: 1 });
57
57
  DefaultSchema.index({ client: 1, date: 1 });
58
58
  DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
59
- exports.MonitorMemorys = index_1.ResolveIOServer.getMainDB().model('monitor-memorys', DefaultSchema);
60
- exports.MonitorMemorys['simplschema'] = new simpl_schema_1.default(schema);
61
- schema._id = {
62
- type: mongoose_1.Schema.Types.Mixed
63
- };
64
- var VersionSchema = new mongoose_1.Schema(schema, {
65
- skipVersioning: true,
66
- versionKey: false,
67
- timestamps: true
68
- });
69
- exports.MonitorMemorys['versionCollection'] = 'monitor-memorys.versions';
70
- exports.MonitorMemoryVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMemorys['versionCollection'], VersionSchema);
59
+ exports.MonitorMemorys = null;
60
+ exports.MonitorMemoryVersions = null;
61
+ initializeCollection();
62
+ function initializeCollection() {
63
+ if (index_1.ResolveIOServer.getMainDB()) {
64
+ exports.MonitorMemorys = index_1.ResolveIOServer.getMainDB().model('monitor-memorys', DefaultSchema);
65
+ exports.MonitorMemorys['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.MonitorMemorys['versionCollection'] = 'monitor-memorys.versions';
75
+ exports.MonitorMemoryVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMemorys['versionCollection'], VersionSchema);
76
+ }
77
+ else {
78
+ setTimeout(function () {
79
+ initializeCollection();
80
+ }, 0);
81
+ }
82
+ }
71
83
 
72
84
  //# sourceMappingURL=monitor-memory.collection.js.map
@@ -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;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,cAAc,EAAE;QACf,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,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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});\n\ninterface ResolveIOModel extends MonitorMemoryModel, Document {}\nexport const MonitorMemorys: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-memorys', DefaultSchema);\n\nMonitorMemorys['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorMemorys['versionCollection'] = 'monitor-memorys.versions';\n\nexport const MonitorMemoryVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorMemorys['versionCollection'], VersionSchema);"]}
1
+ {"version":3,"sources":["../../src/collections/monitor-memory.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AAC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EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;AAI7D,QAAA,cAAc,GAA0B,IAAI,CAAC;AAC7C,QAAA,qBAAqB,GAA0B,IAAI,CAAC;AAE/D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,sBAAc,GAAG,uBAAe,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});\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}"]}
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
2
2
  import { MonitorMongoModel } from '../models/monitor-mongo.model';
3
3
  interface ResolveIOModel extends MonitorMongoModel, Document {
4
4
  }
5
- export declare const MonitorMongos: Model<ResolveIOModel>;
6
- export declare const MonitorMongoVersions: Model<ResolveIOModel>;
5
+ export declare let MonitorMongos: Model<ResolveIOModel>;
6
+ export declare let MonitorMongoVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -50,17 +50,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
50
50
  DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
51
51
  DefaultSchema.index({ client: 1, date: 1, method: 1 });
52
52
  DefaultSchema.index({ client: 1, instance: 1, date: 1, method: 1 });
53
- exports.MonitorMongos = index_1.ResolveIOServer.getMainDB().model('monitor-mongos', DefaultSchema);
54
- exports.MonitorMongos['simplschema'] = new simpl_schema_1.default(schema);
55
- schema._id = {
56
- type: mongoose_1.Schema.Types.Mixed
57
- };
58
- var VersionSchema = new mongoose_1.Schema(schema, {
59
- skipVersioning: true,
60
- versionKey: false,
61
- timestamps: true
62
- });
63
- exports.MonitorMongos['versionCollection'] = 'monitor-mongos.versions';
64
- exports.MonitorMongoVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMongos['versionCollection'], VersionSchema);
53
+ exports.MonitorMongos = null;
54
+ exports.MonitorMongoVersions = null;
55
+ initializeCollection();
56
+ function initializeCollection() {
57
+ if (index_1.ResolveIOServer.getMainDB()) {
58
+ exports.MonitorMongos = index_1.ResolveIOServer.getMainDB().model('monitor-mongos', DefaultSchema);
59
+ exports.MonitorMongos['simplschema'] = new simpl_schema_1.default(schema);
60
+ schema._id = {
61
+ type: mongoose_1.Schema.Types.Mixed
62
+ };
63
+ var VersionSchema = new mongoose_1.Schema(schema, {
64
+ skipVersioning: true,
65
+ versionKey: false,
66
+ timestamps: true
67
+ });
68
+ exports.MonitorMongos['versionCollection'] = 'monitor-mongos.versions';
69
+ exports.MonitorMongoVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMongos['versionCollection'], VersionSchema);
70
+ }
71
+ else {
72
+ setTimeout(function () {
73
+ initializeCollection();
74
+ }, 0);
75
+ }
76
+ }
65
77
 
66
78
  //# sourceMappingURL=monitor-mongo.collection.js.map
@@ -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,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;AACxE,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;AACrD,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;AAGrD,QAAA,aAAa,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;AAEvH,qBAAa,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,qBAAa,CAAC,mBAAmB,CAAC,GAAG,yBAAyB,CAAC;AAElD,QAAA,oBAAoB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,qBAAa,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,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});\n\ninterface ResolveIOModel extends MonitorMongoModel, Document {}\nexport const MonitorMongos: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-mongos', DefaultSchema);\n\nMonitorMongos['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorMongos['versionCollection'] = 'monitor-mongos.versions';\n\nexport const MonitorMongoVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorMongos['versionCollection'], VersionSchema);"]}
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,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AAE,IAAI;SAChB,CAAC,CAAC;QAEH,qBAAa,CAAC,mBAAmB,CAAC,GAAG,yBAAyB,CAAC;QAE/D,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":"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});\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}"]}
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
2
2
  import { NotificationModel } from '../models/notification.model';
3
3
  interface ResolveIOModel extends NotificationModel, Document {
4
4
  }
5
- export declare const Notifications: Model<ResolveIOModel>;
6
- export declare const NotificationVersions: Model<ResolveIOModel>;
5
+ export declare let Notifications: Model<ResolveIOModel>;
6
+ export declare let NotificationVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -29,17 +29,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
29
29
  versionKey: false,
30
30
  timestamps: true
31
31
  });
32
- exports.Notifications = index_1.ResolveIOServer.getMainDB().model('notifications', DefaultSchema);
33
- exports.Notifications['simplschema'] = new simpl_schema_1.default(schema);
34
- schema._id = {
35
- type: mongoose_1.Schema.Types.Mixed
36
- };
37
- var VersionSchema = new mongoose_1.Schema(schema, {
38
- skipVersioning: true,
39
- versionKey: false,
40
- timestamps: true
41
- });
42
- exports.Notifications['versionCollection'] = 'notifications.versions';
43
- exports.NotificationVersions = index_1.ResolveIOServer.getMainDB().model(exports.Notifications['versionCollection'], VersionSchema);
32
+ exports.Notifications = null;
33
+ exports.NotificationVersions = null;
34
+ initializeCollection();
35
+ function initializeCollection() {
36
+ if (index_1.ResolveIOServer.getMainDB()) {
37
+ exports.Notifications = index_1.ResolveIOServer.getMainDB().model('notifications', DefaultSchema);
38
+ exports.Notifications['simplschema'] = new simpl_schema_1.default(schema);
39
+ schema._id = {
40
+ type: mongoose_1.Schema.Types.Mixed
41
+ };
42
+ var VersionSchema = new mongoose_1.Schema(schema, {
43
+ skipVersioning: true,
44
+ versionKey: false,
45
+ timestamps: true
46
+ });
47
+ exports.Notifications['versionCollection'] = 'notifications.versions';
48
+ exports.NotificationVersions = index_1.ResolveIOServer.getMainDB().model(exports.Notifications['versionCollection'], VersionSchema);
49
+ }
50
+ else {
51
+ setTimeout(function () {
52
+ initializeCollection();
53
+ }, 0);
54
+ }
55
+ }
44
56
 
45
57
  //# sourceMappingURL=notification.collection.js.map
@@ -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;AAGU,QAAA,aAAa,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAEtH,qBAAa,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,qBAAa,CAAC,mBAAmB,CAAC,GAAG,wBAAwB,CAAC;AAEjD,QAAA,oBAAoB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,qBAAa,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,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 {}\nexport const Notifications: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('notifications', DefaultSchema);\n\nNotifications['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nNotifications['versionCollection'] = 'notifications.versions';\n\nexport const NotificationVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(Notifications['versionCollection'], VersionSchema);"]}
1
+ {"version":3,"sources":["../../src/collections/notification.collection.ts"],"names":[],"mappings":";;AAAA,qCAAm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AAC,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}"]}
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
2
2
  import { CollectionDocument } from '../models/collection-document.model';
3
3
  interface ResolveIOModel extends CollectionDocument, Document {
4
4
  }
5
- export declare const QueueFlags: Model<ResolveIOModel>;
6
- export declare const QueueFlagVersions: Model<ResolveIOModel>;
5
+ export declare let QueueFlags: Model<ResolveIOModel>;
6
+ export declare let QueueFlagVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -27,17 +27,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
27
27
  timestamps: true
28
28
  });
29
29
  DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 60 });
30
- exports.QueueFlags = index_1.ResolveIOServer.getMainDB().model('queue-flags', DefaultSchema);
31
- exports.QueueFlags['simplschema'] = new simpl_schema_1.default(schema);
32
- schema._id = {
33
- type: mongoose_1.Schema.Types.Mixed
34
- };
35
- var VersionSchema = new mongoose_1.Schema(schema, {
36
- skipVersioning: true,
37
- versionKey: false,
38
- timestamps: true
39
- });
40
- exports.QueueFlags['versionCollection'] = 'queue-flags.versions';
41
- exports.QueueFlagVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueFlags['versionCollection'], VersionSchema);
30
+ exports.QueueFlags = null;
31
+ exports.QueueFlagVersions = null;
32
+ initializeCollection();
33
+ function initializeCollection() {
34
+ if (index_1.ResolveIOServer.getMainDB()) {
35
+ exports.QueueFlags = index_1.ResolveIOServer.getMainDB().model('queue-flags', DefaultSchema);
36
+ exports.QueueFlags['simplschema'] = new simpl_schema_1.default(schema);
37
+ schema._id = {
38
+ type: mongoose_1.Schema.Types.Mixed
39
+ };
40
+ var VersionSchema = new mongoose_1.Schema(schema, {
41
+ skipVersioning: true,
42
+ versionKey: false,
43
+ timestamps: true
44
+ });
45
+ exports.QueueFlags['versionCollection'] = 'queue-flags.versions';
46
+ exports.QueueFlagVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueFlags['versionCollection'], VersionSchema);
47
+ }
48
+ else {
49
+ setTimeout(function () {
50
+ initializeCollection();
51
+ }, 0);
52
+ }
53
+ }
42
54
 
43
55
  //# sourceMappingURL=queue-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CAAC,kBAAU,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,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 {}\nexport const QueueFlags: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('queue-flags', DefaultSchema);\n\nQueueFlags['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nQueueFlags['versionCollection'] = 'queue-flags.versions';\n\nexport const QueueFlagVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(QueueFlags['versionCollection'], VersionSchema);"]}
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,IA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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}"]}
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
2
2
  import { QueueMethodModel } from '../models/queue-method.model';
3
3
  interface ResolveIOModel extends QueueMethodModel, Document {
4
4
  }
5
- export declare const QueueMethods: Model<ResolveIOModel>;
6
- export declare const QueueMethodVersions: Model<ResolveIOModel>;
5
+ export declare let QueueMethods: Model<ResolveIOModel>;
6
+ export declare let QueueMethodVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -67,59 +67,71 @@ var DefaultSchema = new mongoose_1.Schema(mongooseSchema, {
67
67
  minimize: false
68
68
  });
69
69
  DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 });
70
- exports.QueueMethods = index_1.ResolveIOServer.getMainDB().model('queue-methods', DefaultSchema);
71
- var vSchema = __assign({}, mongooseSchema);
72
- vSchema._id = {
73
- type: mongoose_1.Schema.Types.Mixed
74
- };
75
- var VersionSchema = new mongoose_1.Schema(vSchema, {
76
- skipVersioning: true,
77
- versionKey: false,
78
- timestamps: true,
79
- minimize: false
80
- });
81
- exports.QueueMethods['versionCollection'] = 'queue-methods.versions';
82
- exports.QueueMethodVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueMethods['versionCollection'], VersionSchema);
83
- var simplSchema = {
84
- _id: {
85
- type: String,
86
- optional: true
87
- },
88
- __v: {
89
- type: Number,
90
- optional: true
91
- },
92
- updatedAt: {
93
- type: Date,
94
- optional: true
95
- },
96
- createdAt: {
97
- type: Date,
98
- optional: true
99
- },
100
- method: {
101
- type: String
102
- },
103
- method_data: {
104
- type: Array
105
- },
106
- 'method_data.$': {
107
- type: Object,
108
- blackbox: true
109
- },
110
- id_ws: {
111
- type: String
112
- },
113
- messageId: {
114
- type: Number
115
- },
116
- id_user: {
117
- type: String
118
- },
119
- user: {
120
- type: String
70
+ exports.QueueMethods = null;
71
+ exports.QueueMethodVersions = null;
72
+ initializeCollection();
73
+ function initializeCollection() {
74
+ if (index_1.ResolveIOServer.getMainDB()) {
75
+ exports.QueueMethods = index_1.ResolveIOServer.getMainDB().model('queue-methods', DefaultSchema);
76
+ var vSchema = __assign({}, mongooseSchema);
77
+ vSchema._id = {
78
+ type: mongoose_1.Schema.Types.Mixed
79
+ };
80
+ var VersionSchema = new mongoose_1.Schema(vSchema, {
81
+ skipVersioning: true,
82
+ versionKey: false,
83
+ timestamps: true,
84
+ minimize: false
85
+ });
86
+ exports.QueueMethods['versionCollection'] = 'queue-methods.versions';
87
+ exports.QueueMethodVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueMethods['versionCollection'], VersionSchema);
88
+ var simplSchema = {
89
+ _id: {
90
+ type: String,
91
+ optional: true
92
+ },
93
+ __v: {
94
+ type: Number,
95
+ optional: true
96
+ },
97
+ updatedAt: {
98
+ type: Date,
99
+ optional: true
100
+ },
101
+ createdAt: {
102
+ type: Date,
103
+ optional: true
104
+ },
105
+ method: {
106
+ type: String
107
+ },
108
+ method_data: {
109
+ type: Array
110
+ },
111
+ 'method_data.$': {
112
+ type: Object,
113
+ blackbox: true
114
+ },
115
+ id_ws: {
116
+ type: String
117
+ },
118
+ messageId: {
119
+ type: Number
120
+ },
121
+ id_user: {
122
+ type: String
123
+ },
124
+ user: {
125
+ type: String
126
+ }
127
+ };
128
+ exports.QueueMethods['simplschema'] = new simpl_schema_1.default(simplSchema);
121
129
  }
122
- };
123
- exports.QueueMethods['simplschema'] = new simpl_schema_1.default(simplSchema);
130
+ else {
131
+ setTimeout(function () {
132
+ initializeCollection();
133
+ }, 0);
134
+ }
135
+ }
124
136
 
125
137
  //# sourceMappingURL=queue-method.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/queue-method.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,cAAc,GAAQ;IACzB,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,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,KAAK;KACX;IACD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AAW,GAAG;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,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,KAAK;KACX;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,SAAS,EAAE;QACV,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,oBAAY,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,WAAW,CAAC,CAAC","file":"queue-method.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { QueueMethodModel } from '../models/queue-method.model';\n\nlet mongooseSchema: 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\tmethod: {\n\t\ttype: String\n\t},\n\tmethod_data: {\n\t\ttype: Array\n\t},\n\t'method_data.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tid_methodLatency: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(mongooseSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true,\n\tminimize: false\n});\n\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60});\n\ninterface ResolveIOModel extends QueueMethodModel, Document {}\nexport const QueueMethods: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('queue-methods', DefaultSchema); \n\nlet vSchema = { ...mongooseSchema };\nvSchema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(vSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true,\n\tminimize: false\n});\n\nQueueMethods['versionCollection'] = 'queue-methods.versions';\n\nexport const QueueMethodVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(QueueMethods['versionCollection'], VersionSchema);\n\nlet simplSchema = {\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\tmethod: {\n\t\ttype: String\n\t},\n\tmethod_data: {\n\t\ttype: Array\n\t},\n\t'method_data.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t}\n};\n\nQueueMethods['simplschema'] = new SimpleSchema(simplSchema);"]}
1
+ {"version":3,"sources":["../../src/collections/queue-method.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,cAAc,GAAQ;IACzB,GAA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AI,sBAAY,CAAC,WAAW,CAAC,CAAC;KAC5D;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"queue-method.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { QueueMethodModel } from '../models/queue-method.model';\n\nlet mongooseSchema: 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\tmethod: {\n\t\ttype: String\n\t},\n\tmethod_data: {\n\t\ttype: Array\n\t},\n\t'method_data.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tid_methodLatency: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(mongooseSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true,\n\tminimize: false\n});\n\nDefaultSchema.index({date: 1}, {expireAfterSeconds: 60});\n\ninterface ResolveIOModel extends QueueMethodModel, Document {}\n\nexport let QueueMethods: Model<ResolveIOModel> = null;\nexport let QueueMethodVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tQueueMethods = ResolveIOServer.getMainDB().model('queue-methods', DefaultSchema); \n\n\t\tlet vSchema = { ...mongooseSchema };\n\t\tvSchema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(vSchema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true,\n\t\t\tminimize: false\n\t\t});\n\n\t\tQueueMethods['versionCollection'] = 'queue-methods.versions';\n\n\t\tQueueMethodVersions = ResolveIOServer.getMainDB().model(QueueMethods['versionCollection'], VersionSchema);\n\n\t\tlet simplSchema = {\n\t\t\t_id: {\n\t\t\t\ttype: String,\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\t__v: {\n\t\t\t\ttype: Number,\n\t\t\t\toptional: true \n\t\t\t},\n\t\t\tupdatedAt: {\n\t\t\t\ttype: Date,\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tcreatedAt: {\n\t\t\t\ttype: Date,\n\t\t\t\toptional: true\n\t\t\t},\n\t\t\tmethod: {\n\t\t\t\ttype: String\n\t\t\t},\n\t\t\tmethod_data: {\n\t\t\t\ttype: Array\n\t\t\t},\n\t\t\t'method_data.$': {\n\t\t\t\ttype: Object,\n\t\t\t\tblackbox: true\n\t\t\t},\n\t\t\tid_ws: {\n\t\t\t\ttype: String\n\t\t\t},\n\t\t\tmessageId: {\n\t\t\t\ttype: Number\n\t\t\t},\n\t\t\tid_user: {\n\t\t\t\ttype: String\n\t\t\t},\n\t\t\tuser: {\n\t\t\t\ttype: String\n\t\t\t}\n\t\t};\n\n\t\tQueueMethods['simplschema'] = new SimpleSchema(simplSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
2
2
  import { QueueResponseModel } from '../models/queue-response.model';
3
3
  interface ResolveIOModel extends QueueResponseModel, Document {
4
4
  }
5
- export declare const QueueResponses: Model<ResolveIOModel>;
6
- export declare const QueueResponseVersions: Model<ResolveIOModel>;
5
+ export declare let QueueResponses: Model<ResolveIOModel>;
6
+ export declare let QueueResponseVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -60,18 +60,30 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
60
60
  timestamps: true
61
61
  });
62
62
  DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 });
63
- exports.QueueResponses = index_1.ResolveIOServer.getMainDB().model('queue-responses', DefaultSchema);
64
- var vSchema = __assign({}, schema);
65
- vSchema._id = {
66
- type: mongoose_1.Schema.Types.Mixed
67
- };
68
- var VersionSchema = new mongoose_1.Schema(vSchema, {
69
- skipVersioning: true,
70
- versionKey: false,
71
- timestamps: true
72
- });
73
- exports.QueueResponses['versionCollection'] = 'queue-responses.versions';
74
- exports.QueueResponseVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueResponses['versionCollection'], VersionSchema);
75
- exports.QueueResponses['simplschema'] = new simpl_schema_1.default(schema);
63
+ exports.QueueResponses = null;
64
+ exports.QueueResponseVersions = null;
65
+ initializeCollection();
66
+ function initializeCollection() {
67
+ if (index_1.ResolveIOServer.getMainDB()) {
68
+ exports.QueueResponses = index_1.ResolveIOServer.getMainDB().model('queue-responses', DefaultSchema);
69
+ var vSchema = __assign({}, schema);
70
+ vSchema._id = {
71
+ type: mongoose_1.Schema.Types.Mixed
72
+ };
73
+ var VersionSchema = new mongoose_1.Schema(vSchema, {
74
+ skipVersioning: true,
75
+ versionKey: false,
76
+ timestamps: true
77
+ });
78
+ exports.QueueResponses['versionCollection'] = 'queue-responses.versions';
79
+ exports.QueueResponseVersions = index_1.ResolveIOServer.getMainDB().model(exports.QueueResponses['versionCollection'], VersionSchema);
80
+ exports.QueueResponses['simplschema'] = new simpl_schema_1.default(schema);
81
+ }
82
+ else {
83
+ setTimeout(function () {
84
+ initializeCollection();
85
+ }, 0);
86
+ }
87
+ }
76
88
 
77
89
  //# sourceMappingURL=queue-response.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/queue-response.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACj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ACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,sBAAc,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,CAAC;AAEpD,QAAA,qBAAqB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;AAElJ,sBAAc,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC","file":"queue-response.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { QueueResponseModel } from '../models/queue-response.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\tmethod: {\n\t\ttype: String\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tresponse: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tdate: {\n\t\ttype: Date\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});\n\ninterface ResolveIOModel extends QueueResponseModel, Document {}\nexport const QueueResponses: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('queue-responses', DefaultSchema); \n\nlet vSchema = { ...schema };\nvSchema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(vSchema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nQueueResponses['versionCollection'] = 'queue-responses.versions';\n\nexport const QueueResponseVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(QueueResponses['versionCollection'], VersionSchema);\n\nQueueResponses['simplschema'] = new SimpleSchema(schema);"]}
1
+ {"version":3,"sources":["../../src/collections/queue-response.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,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,SAAS,EAAE;QACV,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;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,EAAC,CAAC,CAAC;AAI9C,QAAA,cAAc,GAA0B,IAAI,CAAC;AAC7C,QAAA,qBAAqB,GAA0B,IAAI,CAAC;AAE/D,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,sBAAc,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QAErF,IAAI,OAAO,gBAAQ,MAAM,CAAE,CAAC;QAC5B,OAAO,CAAC,GAAG,GAAG;YACb,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;SACxB,CAAC;QAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,OAAO,EAAE;YACvC,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;QAE9G,sBAAc,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;KACzD;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"queue-response.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { QueueResponseModel } from '../models/queue-response.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\tmethod: {\n\t\ttype: String\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tresponse: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tdate: {\n\t\ttype: Date\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});\n\ninterface ResolveIOModel extends QueueResponseModel, Document {}\n\nexport let QueueResponses: Model<ResolveIOModel> = null;\nexport let QueueResponseVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tQueueResponses = ResolveIOServer.getMainDB().model('queue-responses', DefaultSchema); \n\n\t\tlet vSchema = { ...schema };\n\t\tvSchema._id = {\n\t\t\ttype: Schema.Types.Mixed\n\t\t};\n\n\t\tlet VersionSchema = new Schema(vSchema, {\n\t\t\tskipVersioning: true,\n\t\t\tversionKey: false,\n\t\t\ttimestamps: true\n\t\t});\n\n\t\tQueueResponses['versionCollection'] = 'queue-responses.versions';\n\n\t\tQueueResponseVersions = ResolveIOServer.getMainDB().model(QueueResponses['versionCollection'], VersionSchema);\n\n\t\tQueueResponses['simplschema'] = new SimpleSchema(schema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}