@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 { FlagModel } from '../models/flag.model';
3
3
  interface ResolveIOModel extends FlagModel, Document {
4
4
  }
5
- export declare const Flags: Model<ResolveIOModel>;
6
- export declare const FlagVersions: Model<ResolveIOModel>;
5
+ export declare let Flags: Model<ResolveIOModel>;
6
+ export declare let FlagVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -33,17 +33,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
33
33
  versionKey: false,
34
34
  timestamps: true
35
35
  });
36
- exports.Flags = index_1.ResolveIOServer.getMainDB().model('flags', DefaultSchema);
37
- exports.Flags['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.Flags['versionCollection'] = 'flags.versions';
47
- exports.FlagVersions = index_1.ResolveIOServer.getMainDB().model(exports.Flags['versionCollection'], VersionSchema);
36
+ exports.Flags = null;
37
+ exports.FlagVersions = null;
38
+ initializeCollection();
39
+ function initializeCollection() {
40
+ if (index_1.ResolveIOServer.getMainDB()) {
41
+ exports.Flags = index_1.ResolveIOServer.getMainDB().model('flags', DefaultSchema);
42
+ exports.Flags['simplschema'] = new simpl_schema_1.default(schema);
43
+ schema._id = {
44
+ type: mongoose_1.Schema.Types.Mixed
45
+ };
46
+ var VersionSchema = new mongoose_1.Schema(schema, {
47
+ skipVersioning: true,
48
+ versionKey: false,
49
+ timestamps: true
50
+ });
51
+ exports.Flags['versionCollection'] = 'flags.versions';
52
+ exports.FlagVersions = index_1.ResolveIOServer.getMainDB().model(exports.Flags['versionCollection'], VersionSchema);
53
+ }
54
+ else {
55
+ setTimeout(function () {
56
+ initializeCollection();
57
+ }, 0);
58
+ }
59
+ }
48
60
 
49
61
  //# sourceMappingURL=flag.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/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;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,OAAO;QACb,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;AAGU,QAAA,KAAK,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAEtG,aAAK,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAEhD,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,aAAK,CAAC,mBAAmB,CAAC,GAAG,gBAAgB,CAAC;AAEjC,QAAA,YAAY,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,aAAK,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"flag.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { FlagModel } from '../models/flag.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\ttype: {\n\t\ttype: String\n\t},\n\tvalue: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends FlagModel, Document {}\nexport const Flags: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('flags', DefaultSchema);\n\nFlags['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\nFlags['versionCollection'] = 'flags.versions';\n\nexport const FlagVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(Flags['versionCollection'], VersionSchema);\n"]}
1
+ {"version":3,"sources":["../../src/collections/flag.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,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,oBAAY,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,aAAK,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC5F;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"flag.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { FlagModel } from '../models/flag.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\ttype: {\n\t\ttype: String\n\t},\n\tvalue: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\ninterface ResolveIOModel extends FlagModel, Document {}\n\nexport let Flags: Model<ResolveIOModel> = null;\nexport let FlagVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tFlags = ResolveIOServer.getMainDB().model('flags', DefaultSchema);\n\n\t\tFlags['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\tFlags['versionCollection'] = 'flags.versions';\n\n\t\tFlagVersions = ResolveIOServer.getMainDB().model(Flags['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 { LogMethodLatencyModel } from '../models/log-method-latency.model';
3
3
  interface ResolveIOModel extends LogMethodLatencyModel, Document {
4
4
  }
5
- export declare const LogMethodLatencies: Model<ResolveIOModel>;
6
- export declare const LogMethodLatencyVersions: Model<ResolveIOModel>;
5
+ export declare let LogMethodLatencies: Model<ResolveIOModel>;
6
+ export declare let LogMethodLatencyVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -41,16 +41,28 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
41
41
  DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
42
42
  DefaultSchema.index({ latency_ms: 1 });
43
43
  DefaultSchema.index({ method: 1 });
44
- exports.LogMethodLatencies = index_1.ResolveIOServer.getMainDB().model('log-method-latencies', DefaultSchema);
45
- schema._id = {
46
- type: mongoose_1.Schema.Types.Mixed
47
- };
48
- var VersionSchema = new mongoose_1.Schema(schema, {
49
- skipVersioning: true,
50
- versionKey: false,
51
- timestamps: true
52
- });
53
- exports.LogMethodLatencies['versionCollection'] = 'log-method-latencies.versions';
54
- exports.LogMethodLatencyVersions = index_1.ResolveIOServer.getMainDB().model(exports.LogMethodLatencies['versionCollection'], VersionSchema);
44
+ exports.LogMethodLatencies = null;
45
+ exports.LogMethodLatencyVersions = null;
46
+ initializeCollection();
47
+ function initializeCollection() {
48
+ if (index_1.ResolveIOServer.getMainDB()) {
49
+ exports.LogMethodLatencies = index_1.ResolveIOServer.getMainDB().model('log-method-latencies', DefaultSchema);
50
+ schema._id = {
51
+ type: mongoose_1.Schema.Types.Mixed
52
+ };
53
+ var VersionSchema = new mongoose_1.Schema(schema, {
54
+ skipVersioning: true,
55
+ versionKey: false,
56
+ timestamps: true
57
+ });
58
+ exports.LogMethodLatencies['versionCollection'] = 'log-method-latencies.versions';
59
+ exports.LogMethodLatencyVersions = index_1.ResolveIOServer.getMainDB().model(exports.LogMethodLatencies['versionCollection'], VersionSchema);
60
+ }
61
+ else {
62
+ setTimeout(function () {
63
+ initializeCollection();
64
+ }, 0);
65
+ }
66
+ }
55
67
 
56
68
  //# sourceMappingURL=log-method-latency.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/log-method-latency.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,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,UAAU,EAAE;QACX,IAAI,EAAE,IAAI;KACV;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,UAAU,EAAE;QACX,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,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;AAC7E,aAAa,CAAC,KAAK,CAAC,EAAC,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;AACrC,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;AAGpB,QAAA,kBAAkB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;AAElI,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,0BAAkB,CAAC,mBAAmB,CAAC,GAAG,+BAA+B,CAAC;AAE7D,QAAA,wBAAwB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,0BAAkB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"log-method-latency.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LogMethodLatencyModel } from '../models/log-method-latency.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\tdate_start: {\n\t\ttype: Date\n\t},\n\tdate_end: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tlatency_ms: {\n\t\ttype: Number\n\t},\n\tmethod: {\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({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({latency_ms: 1});\nDefaultSchema.index({method: 1});\n\ninterface ResolveIOModel extends LogMethodLatencyModel, Document {}\nexport const LogMethodLatencies: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('log-method-latencies', DefaultSchema);\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\nLogMethodLatencies['versionCollection'] = 'log-method-latencies.versions';\n\nexport const LogMethodLatencyVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(LogMethodLatencies['versionCollection'], VersionSchema);"]}
1
+ {"version":3,"sources":["../../src/collections/log-method-latency.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,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,UAAU,EAAE;QACX,IAAI,EAAE,IAAI;KACV;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,UAAU,EAAE;QACX,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,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;AAC7E,aAAa,CAAC,KAAK,CAAC,EAAC,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;AACrC,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;AAItB,QAAA,kBAAkB,GAA0B,IAAI,CAAC;AACjD,QAAA,wBAAwB,GAA0B,IAAI,CAAC;AAElE,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,0BAAkB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;QAE9F,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,0BAAkB,CAAC,mBAAmB,CAAC,GAAG,+BAA+B,CAAC;QAE1E,gCAAwB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,0BAAkB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KACrH;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log-method-latency.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LogMethodLatencyModel } from '../models/log-method-latency.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\tdate_start: {\n\t\ttype: Date\n\t},\n\tdate_end: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tlatency_ms: {\n\t\ttype: Number\n\t},\n\tmethod: {\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({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({latency_ms: 1});\nDefaultSchema.index({method: 1});\n\ninterface ResolveIOModel extends LogMethodLatencyModel, Document {}\n\nexport let LogMethodLatencies: Model<ResolveIOModel> = null;\nexport let LogMethodLatencyVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tLogMethodLatencies = ResolveIOServer.getMainDB().model('log-method-latencies', DefaultSchema);\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\tLogMethodLatencies['versionCollection'] = 'log-method-latencies.versions';\n\n\t\tLogMethodLatencyVersions = ResolveIOServer.getMainDB().model(LogMethodLatencies['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 { LogSubscriptionModel } from '../models/log-subscription.model';
3
3
  interface ResolveIOModel extends LogSubscriptionModel, Document {
4
4
  }
5
- export declare const LogSubscriptions: Model<ResolveIOModel>;
6
- export declare const LogSubscriptionVersions: Model<ResolveIOModel>;
5
+ export declare let LogSubscriptions: Model<ResolveIOModel>;
6
+ export declare let LogSubscriptionVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -49,16 +49,28 @@ DefaultSchema.index({ type: 1 });
49
49
  DefaultSchema.index({ collection_name: 1 });
50
50
  DefaultSchema.index({ date: 1, type: 1 });
51
51
  DefaultSchema.index({ createdAt: 1 });
52
- exports.LogSubscriptions = index_1.ResolveIOServer.getMainDB().model('log-subscriptions', DefaultSchema);
53
- schema._id = {
54
- type: mongoose_1.Schema.Types.Mixed
55
- };
56
- var VersionSchema = new mongoose_1.Schema(schema, {
57
- skipVersioning: true,
58
- versionKey: false,
59
- timestamps: true
60
- });
61
- exports.LogSubscriptions['versionCollection'] = 'log-subscriptions.versions';
62
- exports.LogSubscriptionVersions = index_1.ResolveIOServer.getMainDB().model(exports.LogSubscriptions['versionCollection'], VersionSchema);
52
+ exports.LogSubscriptions = null;
53
+ exports.LogSubscriptionVersions = null;
54
+ initializeCollection();
55
+ function initializeCollection() {
56
+ if (index_1.ResolveIOServer.getMainDB()) {
57
+ exports.LogSubscriptions = index_1.ResolveIOServer.getMainDB().model('log-subscriptions', DefaultSchema);
58
+ schema._id = {
59
+ type: mongoose_1.Schema.Types.Mixed
60
+ };
61
+ var VersionSchema = new mongoose_1.Schema(schema, {
62
+ skipVersioning: true,
63
+ versionKey: false,
64
+ timestamps: true
65
+ });
66
+ exports.LogSubscriptions['versionCollection'] = 'log-subscriptions.versions';
67
+ exports.LogSubscriptionVersions = index_1.ResolveIOServer.getMainDB().model(exports.LogSubscriptions['versionCollection'], VersionSchema);
68
+ }
69
+ else {
70
+ setTimeout(function () {
71
+ initializeCollection();
72
+ }, 0);
73
+ }
74
+ }
63
75
 
64
76
  //# sourceMappingURL=log-subscription.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/log-subscription.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,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,E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cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,wBAAgB,CAAC,mBAAmB,CAAC,GAAG,4BAA4B,CAAC;AAExD,QAAA,uBAAuB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,wBAAgB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"log-subscription.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LogSubscriptionModel } from '../models/log-subscription.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\tdate: {\n\t\ttype: Date\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tsubscription: {\n\t\ttype: String\n\t},\n\tcollection_name: {\n\t\ttype: String\n\t},\n\tsubData: {\n\t\ttype: Array\t\n\t},\n\t'subData.$': {\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({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({type: 1});\nDefaultSchema.index({collection_name: 1});\nDefaultSchema.index({date: 1, type: 1});\nDefaultSchema.index({createdAt: 1});\n\ninterface ResolveIOModel extends LogSubscriptionModel, Document {}\nexport const LogSubscriptions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('log-subscriptions', DefaultSchema);\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\nLogSubscriptions['versionCollection'] = 'log-subscriptions.versions';\n\nexport const LogSubscriptionVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(LogSubscriptions['versionCollection'], VersionSchema);"]}
1
+ {"version":3,"sources":["../../src/collections/log-subscription.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,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,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,YAAY,EAAE;QACb,IAAI,EAAE,MAAM;KACZ;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,KAAK;KACX;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,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,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;AACxE,aAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AAC/B,aAAa,CAAC,KAAK,CAAC,EAAC,eAAe,EAAE,CAAC,EAAC,CAAC,CAAC;AAC1C,aAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AACxC,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,CAAC,CAAC;AAIzB,QAAA,gBAAgB,GAA0B,IAAI,CAAC;AAC/C,QAAA,uBAAuB,GAA0B,IAAI,CAAC;AAEjE,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,wBAAgB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;QAEzF,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,wBAAgB,CAAC,mBAAmB,CAAC,GAAG,4BAA4B,CAAC;QAErE,+BAAuB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,wBAAgB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAClH;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log-subscription.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LogSubscriptionModel } from '../models/log-subscription.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\tdate: {\n\t\ttype: Date\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tsubscription: {\n\t\ttype: String\n\t},\n\tcollection_name: {\n\t\ttype: String\n\t},\n\tsubData: {\n\t\ttype: Array\t\n\t},\n\t'subData.$': {\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({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({type: 1});\nDefaultSchema.index({collection_name: 1});\nDefaultSchema.index({date: 1, type: 1});\nDefaultSchema.index({createdAt: 1});\n\ninterface ResolveIOModel extends LogSubscriptionModel, Document {}\n\nexport let LogSubscriptions: Model<ResolveIOModel> = null;\nexport let LogSubscriptionVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tLogSubscriptions = ResolveIOServer.getMainDB().model('log-subscriptions', DefaultSchema);\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\tLogSubscriptions['versionCollection'] = 'log-subscriptions.versions';\n\n\t\tLogSubscriptionVersions = ResolveIOServer.getMainDB().model(LogSubscriptions['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 { LogModel } from '../models/log.model';
3
3
  interface ResolveIOModel extends LogModel, Document {
4
4
  }
5
- export declare const Logs: Model<ResolveIOModel>;
6
- export declare const LogVersions: Model<ResolveIOModel>;
5
+ export declare let Logs: Model<ResolveIOModel>;
6
+ export declare let LogVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -65,16 +65,28 @@ DefaultSchema.index({ type: 1 });
65
65
  DefaultSchema.index({ type: 1, date: 1 });
66
66
  DefaultSchema.index({ user: 1, date: 1 });
67
67
  DefaultSchema.index({ user: 1, type: 1, date: 1 });
68
- exports.Logs = index_1.ResolveIOServer.getMainDB().model('logs', DefaultSchema);
69
- schema._id = {
70
- type: mongoose_1.Schema.Types.Mixed
71
- };
72
- var VersionSchema = new mongoose_1.Schema(schema, {
73
- skipVersioning: true,
74
- versionKey: false,
75
- timestamps: true
76
- });
77
- exports.Logs['versionCollection'] = 'logs.versions';
78
- exports.LogVersions = index_1.ResolveIOServer.getMainDB().model(exports.Logs['versionCollection'], VersionSchema);
68
+ exports.Logs = null;
69
+ exports.LogVersions = null;
70
+ initializeCollection();
71
+ function initializeCollection() {
72
+ if (index_1.ResolveIOServer.getMainDB()) {
73
+ exports.Logs = index_1.ResolveIOServer.getMainDB().model('logs', DefaultSchema);
74
+ schema._id = {
75
+ type: mongoose_1.Schema.Types.Mixed
76
+ };
77
+ var VersionSchema = new mongoose_1.Schema(schema, {
78
+ skipVersioning: true,
79
+ versionKey: false,
80
+ timestamps: true
81
+ });
82
+ exports.Logs['versionCollection'] = 'logs.versions';
83
+ exports.LogVersions = index_1.ResolveIOServer.getMainDB().model(exports.Logs['versionCollection'], VersionSchema);
84
+ }
85
+ else {
86
+ setTimeout(function () {
87
+ initializeCollection();
88
+ }, 0);
89
+ }
90
+ }
79
91
 
80
92
  //# sourceMappingURL=log.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/log.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,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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EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AACxC,aAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AAGpC,QAAA,IAAI,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAEpG,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,YAAI,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC;AAE/B,QAAA,WAAW,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,YAAI,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"log.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LogModel } from '../models/log.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\tdate: {\n\t\ttype: Date\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\ttitle: {\n\t\ttype: String\n\t},\n\tmessage: {\n\t\ttype: String\n\t},\n\tpayload: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: String\n\t},\n\troute: {\n\t\ttype: String\n\t},\n\tdata_0: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tdata_1: {\n\t\ttype: String,\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({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({type: 1});\nDefaultSchema.index({type: 1, date: 1});\nDefaultSchema.index({user: 1, date: 1});\nDefaultSchema.index({user: 1, type: 1, date: 1});\n\ninterface ResolveIOModel extends LogModel, Document {}\nexport const Logs: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('logs', DefaultSchema);\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\nLogs['versionCollection'] = 'logs.versions';\n\nexport const LogVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(Logs['versionCollection'], VersionSchema);"]}
1
+ {"version":3,"sources":["../../src/collections/log.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,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,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,M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C,MAAM,EAAE,aAAa,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,YAAI,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC;QAE5C,mBAAW,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,YAAI,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KAC1F;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LogModel } from '../models/log.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\tdate: {\n\t\ttype: Date\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\ttitle: {\n\t\ttype: String\n\t},\n\tmessage: {\n\t\ttype: String\n\t},\n\tpayload: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: String\n\t},\n\troute: {\n\t\ttype: String\n\t},\n\tdata_0: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tdata_1: {\n\t\ttype: String,\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({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\nDefaultSchema.index({type: 1});\nDefaultSchema.index({type: 1, date: 1});\nDefaultSchema.index({user: 1, date: 1});\nDefaultSchema.index({user: 1, type: 1, date: 1});\n\ninterface ResolveIOModel extends LogModel, Document {}\n\nexport let Logs: Model<ResolveIOModel> = null;\nexport let LogVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tLogs = ResolveIOServer.getMainDB().model('logs', DefaultSchema);\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\tLogs['versionCollection'] = 'logs.versions';\n\n\t\tLogVersions = ResolveIOServer.getMainDB().model(Logs['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 { LoggedInUserModel } from '../models/logged-in-users.model';
3
3
  interface ResolveIOModel extends LoggedInUserModel, Document {
4
4
  }
5
- export declare const LoggedInUsers: Model<ResolveIOModel>;
6
- export declare const LoggedInUserVersions: Model<ResolveIOModel>;
5
+ export declare let LoggedInUsers: Model<ResolveIOModel>;
6
+ export declare let LoggedInUserVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -57,17 +57,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
57
57
  timestamps: true
58
58
  });
59
59
  DefaultSchema.index({ id_ws: 1 });
60
- exports.LoggedInUsers = index_1.ResolveIOServer.getMainDB().model('logged-in-users', DefaultSchema);
61
- var vSchema = __assign({}, schema);
62
- vSchema._id = {
63
- type: mongoose_1.Schema.Types.Mixed
64
- };
65
- var VersionSchema = new mongoose_1.Schema(vSchema, {
66
- skipVersioning: true,
67
- versionKey: false,
68
- timestamps: true
69
- });
70
- exports.LoggedInUsers['versionCollection'] = 'logged-in-users.versions';
71
- exports.LoggedInUserVersions = index_1.ResolveIOServer.getMainDB().model(exports.LoggedInUsers['versionCollection'], VersionSchema);
60
+ exports.LoggedInUsers = null;
61
+ exports.LoggedInUserVersions = null;
62
+ initializeCollection();
63
+ function initializeCollection() {
64
+ if (index_1.ResolveIOServer.getMainDB()) {
65
+ exports.LoggedInUsers = index_1.ResolveIOServer.getMainDB().model('logged-in-users', DefaultSchema);
66
+ var vSchema = __assign({}, schema);
67
+ vSchema._id = {
68
+ type: mongoose_1.Schema.Types.Mixed
69
+ };
70
+ var VersionSchema = new mongoose_1.Schema(vSchema, {
71
+ skipVersioning: true,
72
+ versionKey: false,
73
+ timestamps: true
74
+ });
75
+ exports.LoggedInUsers['versionCollection'] = 'logged-in-users.versions';
76
+ exports.LoggedInUserVersions = index_1.ResolveIOServer.getMainDB().model(exports.LoggedInUsers['versionCollection'], VersionSchema);
77
+ }
78
+ else {
79
+ setTimeout(function () {
80
+ initializeCollection();
81
+ }, 0);
82
+ }
83
+ }
72
84
 
73
85
  //# sourceMappingURL=logged-in-users.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/logged-in-users.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,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,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,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,KAAK,EAAE,CAAC,EAAC,CAAC,CAAC;AAGnB,QAAA,aAAa,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;AAExH,IAAI,OAAO,gBAAQ,MAAM,CAAE,CAAC;AAC5B,OAAO,CAAC,GAAG,GAAG;IACb,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,OAAO,EAAE;IACvC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,qBAAa,CAAC,mBAAmB,CAAC,GAAG,0BAA0B,CAAC;AAEnD,QAAA,oBAAoB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,qBAAa,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"logged-in-users.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LoggedInUserModel } from '../models/logged-in-users.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\tdate: {\n\t\ttype: Date\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tapp_version: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tlatency: {\n\t\ttype: Number,\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({id_ws: 1});\n\ninterface ResolveIOModel extends LoggedInUserModel, Document {}\nexport const LoggedInUsers: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('logged-in-users', 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\nLoggedInUsers['versionCollection'] = 'logged-in-users.versions';\n\nexport const LoggedInUserVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(LoggedInUsers['versionCollection'], VersionSchema);"]}
1
+ {"version":3,"sources":["../../src/collections/logged-in-users.collection.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAmD;AACnD,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;IAC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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":"logged-in-users.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport { ResolveIOServer } from '../index';\nimport { LoggedInUserModel } from '../models/logged-in-users.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\tdate: {\n\t\ttype: Date\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tapp_version: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tlatency: {\n\t\ttype: Number,\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({id_ws: 1});\n\ninterface ResolveIOModel extends LoggedInUserModel, Document {}\n\nexport let LoggedInUsers: Model<ResolveIOModel> = null;\nexport let LoggedInUserVersions: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tLoggedInUsers = ResolveIOServer.getMainDB().model('logged-in-users', 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\tLoggedInUsers['versionCollection'] = 'logged-in-users.versions';\n\n\t\tLoggedInUserVersions = ResolveIOServer.getMainDB().model(LoggedInUsers['versionCollection'], VersionSchema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
@@ -2,5 +2,5 @@ import { Model, Document } from 'mongoose';
2
2
  import { MethodCallModel } from '../models/method-call.model';
3
3
  interface ResolveIOModel extends MethodCallModel, Document {
4
4
  }
5
- export declare const MethodCalls: Model<ResolveIOModel>;
5
+ export declare let MethodCalls: Model<ResolveIOModel>;
6
6
  export {};
@@ -40,7 +40,18 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
40
40
  });
41
41
  DefaultSchema.index({ id_user: 1, message_id: 1 });
42
42
  DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 86400 });
43
- exports.MethodCalls = index_1.ResolveIOServer.getMainDB().model('method-calls', DefaultSchema);
44
- exports.MethodCalls['simplschema'] = new simpl_schema_1.default(schema);
43
+ exports.MethodCalls = null;
44
+ initializeCollection();
45
+ function initializeCollection() {
46
+ if (index_1.ResolveIOServer.getMainDB()) {
47
+ exports.MethodCalls = index_1.ResolveIOServer.getMainDB().model('method-calls', DefaultSchema);
48
+ exports.MethodCalls['simplschema'] = new simpl_schema_1.default(schema);
49
+ }
50
+ else {
51
+ setTimeout(function () {
52
+ initializeCollection();
53
+ }, 0);
54
+ }
55
+ }
45
56
 
46
57
  //# sourceMappingURL=method-call.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/method-call.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,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;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,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;AACjD,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;AAGpD,QAAA,WAAW,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;AAEnH,mBAAW,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC","file":"method-call.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MethodCallModel } from '../models/method-call.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\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\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({id_user: 1, message_id: 1});\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 86400});\n\ninterface ResolveIOModel extends MethodCallModel, Document {}\nexport const MethodCalls: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('method-calls', DefaultSchema);\n\nMethodCalls['simplschema'] = new SimpleSchema(schema);"]}
1
+ {"version":3,"sources":["../../src/collections/method-call.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,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;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,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;AACjD,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;AAItD,QAAA,WAAW,GAA0B,IAAI,CAAC;AAErD,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,mBAAW,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;QAE/E,mBAAW,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;KACtD;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"method-call.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MethodCallModel } from '../models/method-call.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\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\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({id_user: 1, message_id: 1});\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 86400});\n\ninterface ResolveIOModel extends MethodCallModel, Document {}\n\nexport let MethodCalls: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMethodCalls = ResolveIOServer.getMainDB().model('method-calls', DefaultSchema);\n\n\t\tMethodCalls['simplschema'] = new SimpleSchema(schema);\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 0);\n\t}\n}"]}
@@ -2,5 +2,5 @@ import { Model, Document } from 'mongoose';
2
2
  import { MethodResponseModel } from '../models/method-response.model';
3
3
  interface ResolveIOModel extends MethodResponseModel, Document {
4
4
  }
5
- export declare const MethodResponses: Model<ResolveIOModel>;
5
+ export declare let MethodResponses: Model<ResolveIOModel>;
6
6
  export {};
@@ -44,7 +44,18 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
44
44
  });
45
45
  DefaultSchema.index({ id_user: 1, message_id: 1 });
46
46
  DefaultSchema.index({ createdAt: 1 }, { expireAfterSeconds: 86400 });
47
- exports.MethodResponses = index_1.ResolveIOServer.getMainDB().model('method-responses', DefaultSchema);
48
- exports.MethodResponses['simplschema'] = new simpl_schema_1.default(schema);
47
+ exports.MethodResponses = null;
48
+ initializeCollection();
49
+ function initializeCollection() {
50
+ if (index_1.ResolveIOServer.getMainDB()) {
51
+ exports.MethodResponses = index_1.ResolveIOServer.getMainDB().model('method-responses', DefaultSchema);
52
+ exports.MethodResponses['simplschema'] = new simpl_schema_1.default(schema);
53
+ }
54
+ else {
55
+ setTimeout(function () {
56
+ initializeCollection();
57
+ }, 0);
58
+ }
59
+ }
49
60
 
50
61
  //# sourceMappingURL=method-response.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/method-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,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,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,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;AACjD,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;AAGpD,QAAA,eAAe,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;AAE3H,uBAAe,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC","file":"method-response.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MethodResponseModel } from '../models/method-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\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: String\n\t},\n\tmethod: {\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({id_user: 1, message_id: 1});\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 86400});\n\ninterface ResolveIOModel extends MethodResponseModel, Document {}\nexport const MethodResponses: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('method-responses', DefaultSchema);\n\nMethodResponses['simplschema'] = new SimpleSchema(schema);"]}
1
+ {"version":3,"sources":["../../src/collections/method-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,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,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,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;AACjD,aAAa,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;AAItD,QAAA,eAAe,GAA0B,IAAI,CAAC;AAEzD,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QAChC,uBAAe,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;QAEvF,uBAAe,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;KAC1D;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"method-response.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MethodResponseModel } from '../models/method-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\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: String\n\t},\n\tmethod: {\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({id_user: 1, message_id: 1});\nDefaultSchema.index({createdAt: 1}, {expireAfterSeconds: 86400});\n\ninterface ResolveIOModel extends MethodResponseModel, Document {}\n\nexport let MethodResponses: Model<ResolveIOModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer.getMainDB()) {\n\t\tMethodResponses = ResolveIOServer.getMainDB().model('method-responses', DefaultSchema);\n\n\t\tMethodResponses['simplschema'] = new SimpleSchema(schema);\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 { MonitorCPUModel } from '../models/monitor-cpu.model';
3
3
  interface ResolveIOModel extends MonitorCPUModel, Document {
4
4
  }
5
- export declare const MonitorCPUs: Model<ResolveIOModel>;
6
- export declare const MonitorCPUVersions: Model<ResolveIOModel>;
5
+ export declare let MonitorCPUs: Model<ResolveIOModel>;
6
+ export declare let MonitorCPUVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -44,17 +44,29 @@ var DefaultSchema = new mongoose_1.Schema(schema, {
44
44
  DefaultSchema.index({ client: 1, instance: 1, date: 1 });
45
45
  DefaultSchema.index({ client: 1, date: 1 });
46
46
  DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
47
- exports.MonitorCPUs = index_1.ResolveIOServer.getMainDB().model('monitor-cpus', DefaultSchema);
48
- exports.MonitorCPUs['simplschema'] = new simpl_schema_1.default(schema);
49
- schema._id = {
50
- type: mongoose_1.Schema.Types.Mixed
51
- };
52
- var VersionSchema = new mongoose_1.Schema(schema, {
53
- skipVersioning: true,
54
- versionKey: false,
55
- timestamps: true
56
- });
57
- exports.MonitorCPUs['versionCollection'] = 'monitor-cpus.versions';
58
- exports.MonitorCPUVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorCPUs['versionCollection'], VersionSchema);
47
+ exports.MonitorCPUs = null;
48
+ exports.MonitorCPUVersions = null;
49
+ initializeCollection();
50
+ function initializeCollection() {
51
+ if (index_1.ResolveIOServer.getMainDB()) {
52
+ exports.MonitorCPUs = index_1.ResolveIOServer.getMainDB().model('monitor-cpus', DefaultSchema);
53
+ exports.MonitorCPUs['simplschema'] = new simpl_schema_1.default(schema);
54
+ schema._id = {
55
+ type: mongoose_1.Schema.Types.Mixed
56
+ };
57
+ var VersionSchema = new mongoose_1.Schema(schema, {
58
+ skipVersioning: true,
59
+ versionKey: false,
60
+ timestamps: true
61
+ });
62
+ exports.MonitorCPUs['versionCollection'] = 'monitor-cpus.versions';
63
+ exports.MonitorCPUVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorCPUs['versionCollection'], VersionSchema);
64
+ }
65
+ else {
66
+ setTimeout(function () {
67
+ initializeCollection();
68
+ }, 0);
69
+ }
70
+ }
59
71
 
60
72
  //# sourceMappingURL=monitor-cpu.collection.js.map
@@ -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,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AAC1C,aAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;AAG3D,QAAA,WAAW,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;AAEnH,mBAAW,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAEtD,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,mBAAW,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,CAAC;AAE9C,QAAA,kBAAkB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,mBAAW,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"monitor-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});\n\ninterface ResolveIOModel extends MonitorCPUModel, Document {}\nexport const MonitorCPUs: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-cpus', DefaultSchema);\n\nMonitorCPUs['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\nMonitorCPUs['versionCollection'] = 'monitor-cpus.versions';\n\nexport const MonitorCPUVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorCPUs['versionCollection'], VersionSchema);"]}
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,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AAI;YACpB,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,IAAI;SAChB,CAAC,CAAC;QAEH,mBAAW,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,CAAC;QAE3D,0BAAkB,GAAG,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,mBAAW,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC;KACxG;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-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});\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}"]}
@@ -2,6 +2,6 @@ import { Model, Document } from 'mongoose';
2
2
  import { MonitorHTTPSInboundModel } from '../models/monitor-https-inbound.model';
3
3
  interface ResolveIOModel extends MonitorHTTPSInboundModel, Document {
4
4
  }
5
- export declare const MonitorHTTPSInbounds: Model<ResolveIOModel>;
6
- export declare const MonitorHTTPInboundVersions: Model<ResolveIOModel>;
5
+ export declare let MonitorHTTPSInbounds: Model<ResolveIOModel>;
6
+ export declare let MonitorHTTPInboundVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -54,17 +54,29 @@ DefaultSchema.index({ client: 1, instance: 1, date: 1, method: 1, url: 1 });
54
54
  DefaultSchema.index({ client: 1, date: 1, duration: 1 });
55
55
  DefaultSchema.index({ client: 1, date: 1, method: 1, url: 1 });
56
56
  DefaultSchema.index({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
57
- exports.MonitorHTTPSInbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-inbounds', DefaultSchema);
58
- exports.MonitorHTTPSInbounds['simplschema'] = new simpl_schema_1.default(schema);
59
- schema._id = {
60
- type: mongoose_1.Schema.Types.Mixed
61
- };
62
- var VersionSchema = new mongoose_1.Schema(schema, {
63
- skipVersioning: true,
64
- versionKey: false,
65
- timestamps: true
66
- });
67
- exports.MonitorHTTPSInbounds['versionCollection'] = 'monitor-https-inbounds.versions';
68
- exports.MonitorHTTPInboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSInbounds['versionCollection'], VersionSchema);
57
+ exports.MonitorHTTPSInbounds = null;
58
+ exports.MonitorHTTPInboundVersions = null;
59
+ initializeCollection();
60
+ function initializeCollection() {
61
+ if (index_1.ResolveIOServer.getMainDB()) {
62
+ exports.MonitorHTTPSInbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-inbounds', DefaultSchema);
63
+ exports.MonitorHTTPSInbounds['simplschema'] = new simpl_schema_1.default(schema);
64
+ schema._id = {
65
+ type: mongoose_1.Schema.Types.Mixed
66
+ };
67
+ var VersionSchema = new mongoose_1.Schema(schema, {
68
+ skipVersioning: true,
69
+ versionKey: false,
70
+ timestamps: true
71
+ });
72
+ exports.MonitorHTTPSInbounds['versionCollection'] = 'monitor-https-inbounds.versions';
73
+ exports.MonitorHTTPInboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSInbounds['versionCollection'], VersionSchema);
74
+ }
75
+ else {
76
+ setTimeout(function () {
77
+ initializeCollection();
78
+ }, 0);
79
+ }
80
+ }
69
81
 
70
82
  //# sourceMappingURL=monitor-https-inbound.collection.js.map
@@ -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,M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,CAAC;AAE/D,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,4BAAoB,CAAC,mBAAmB,CAAC,GAAG,iCAAiC,CAAC;AAEjE,QAAA,0BAA0B,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,4BAAoB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,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});\n\ninterface ResolveIOModel extends MonitorHTTPSInboundModel, Document {}\nexport const MonitorHTTPSInbounds: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-https-inbounds', DefaultSchema);\n\nMonitorHTTPSInbounds['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\nMonitorHTTPSInbounds['versionCollection'] = 'monitor-https-inbounds.versions';\n\nexport const MonitorHTTPInboundVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorHTTPSInbounds['versionCollection'], VersionSchema);"]}
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,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EAAE,MAAM;KACZ;CACD,C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tC,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});\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}"]}