@resolveio/server-lib 20.7.6 → 20.7.8

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 (112) hide show
  1. package/client-server-app.js +1 -1
  2. package/client-server-app.js.map +1 -1
  3. package/collections/app-status.collection.js +1 -1
  4. package/collections/app-status.collection.js.map +1 -1
  5. package/collections/counter.collection.js +1 -1
  6. package/collections/counter.collection.js.map +1 -1
  7. package/collections/cron-job-history.collection.js +1 -1
  8. package/collections/cron-job-history.collection.js.map +1 -1
  9. package/collections/cron-job.collection.js +1 -1
  10. package/collections/cron-job.collection.js.map +1 -1
  11. package/collections/email-history.collection.js +1 -1
  12. package/collections/email-history.collection.js.map +1 -1
  13. package/collections/email-verified.collection.js +1 -1
  14. package/collections/email-verified.collection.js.map +1 -1
  15. package/collections/file.collection.js +1 -1
  16. package/collections/file.collection.js.map +1 -1
  17. package/collections/flag-update.collection.js +1 -1
  18. package/collections/flag-update.collection.js.map +1 -1
  19. package/collections/flag.collection.js +1 -1
  20. package/collections/flag.collection.js.map +1 -1
  21. package/collections/log-method-latency.collection.js +1 -1
  22. package/collections/log-method-latency.collection.js.map +1 -1
  23. package/collections/log-subscription.collection.js +1 -1
  24. package/collections/log-subscription.collection.js.map +1 -1
  25. package/collections/log.collection.js +1 -1
  26. package/collections/log.collection.js.map +1 -1
  27. package/collections/logged-in-users.collection.js +1 -1
  28. package/collections/logged-in-users.collection.js.map +1 -1
  29. package/collections/method-response.collection.js +1 -1
  30. package/collections/method-response.collection.js.map +1 -1
  31. package/collections/monitor-cpu.collection.js +1 -1
  32. package/collections/monitor-cpu.collection.js.map +1 -1
  33. package/collections/monitor-function.collection.js +1 -1
  34. package/collections/monitor-function.collection.js.map +1 -1
  35. package/collections/monitor-memory.collection.js +1 -1
  36. package/collections/monitor-memory.collection.js.map +1 -1
  37. package/collections/monitor-mongo.collection.js +1 -1
  38. package/collections/monitor-mongo.collection.js.map +1 -1
  39. package/collections/notification.collection.js +1 -1
  40. package/collections/notification.collection.js.map +1 -1
  41. package/collections/report-builder-dashboard-builder.collection.js +1 -1
  42. package/collections/report-builder-dashboard-builder.collection.js.map +1 -1
  43. package/collections/report-builder-library.collection.js +1 -1
  44. package/collections/report-builder-library.collection.js.map +1 -1
  45. package/collections/report-builder-report.collection.js +1 -1
  46. package/collections/report-builder-report.collection.js.map +1 -1
  47. package/collections/user-group.collection.js +1 -1
  48. package/collections/user-group.collection.js.map +1 -1
  49. package/collections/user-guide.collection.js +1 -1
  50. package/collections/user-guide.collection.js.map +1 -1
  51. package/collections/user.collection.js +1 -1
  52. package/collections/user.collection.js.map +1 -1
  53. package/fixtures/cron-jobs.js +1 -1
  54. package/fixtures/cron-jobs.js.map +1 -1
  55. package/fixtures/init.js +1 -1
  56. package/fixtures/init.js.map +1 -1
  57. package/http/auth.d.ts +2 -1
  58. package/http/auth.js +1 -1
  59. package/http/auth.js.map +1 -1
  60. package/http/home.js +1 -1
  61. package/http/home.js.map +1 -1
  62. package/managers/cron.manager.d.ts +3 -1
  63. package/managers/cron.manager.js +1 -1
  64. package/managers/cron.manager.js.map +1 -1
  65. package/managers/local-log.manager.d.ts +3 -1
  66. package/managers/local-log.manager.js +1 -1
  67. package/managers/local-log.manager.js.map +1 -1
  68. package/managers/method.manager.d.ts +12 -7
  69. package/managers/method.manager.js +1 -1
  70. package/managers/method.manager.js.map +1 -1
  71. package/managers/mongo.manager.d.ts +17 -12
  72. package/managers/mongo.manager.js +1 -1
  73. package/managers/mongo.manager.js.map +1 -1
  74. package/managers/monitor.manager.d.ts +15 -7
  75. package/managers/monitor.manager.js +1 -1
  76. package/managers/monitor.manager.js.map +1 -1
  77. package/managers/subscription.manager.d.ts +5 -3
  78. package/managers/subscription.manager.js +1 -1
  79. package/managers/subscription.manager.js.map +1 -1
  80. package/managers/websocket.manager.d.ts +3 -1
  81. package/managers/websocket.manager.js +1 -1
  82. package/managers/websocket.manager.js.map +1 -1
  83. package/methods/accounts.js +1 -1
  84. package/methods/accounts.js.map +1 -1
  85. package/methods/aws.js +1 -1
  86. package/methods/aws.js.map +1 -1
  87. package/methods/collections.js +1 -1
  88. package/methods/collections.js.map +1 -1
  89. package/methods/counters.js +1 -1
  90. package/methods/counters.js.map +1 -1
  91. package/methods/cron-jobs.js +1 -1
  92. package/methods/cron-jobs.js.map +1 -1
  93. package/methods/logs.js +1 -1
  94. package/methods/logs.js.map +1 -1
  95. package/methods/monitor.js +1 -1
  96. package/methods/monitor.js.map +1 -1
  97. package/methods/pdf.js +1 -1
  98. package/methods/pdf.js.map +1 -1
  99. package/methods/report-builder.js +1 -1
  100. package/methods/report-builder.js.map +1 -1
  101. package/methods/support.js +1 -1
  102. package/methods/support.js.map +1 -1
  103. package/models/method.model.d.ts +6 -1
  104. package/package.json +5 -4
  105. package/publications/logs.js +1 -1
  106. package/publications/logs.js.map +1 -1
  107. package/resolveio-server-app.d.ts +14 -10
  108. package/resolveio-server-app.js +1 -1
  109. package/resolveio-server-app.js.map +1 -1
  110. package/server-app.d.ts +5 -4
  111. package/server-app.js +1 -1
  112. package/server-app.js.map +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MonitorMemorys=void 0;var resolveio_server_app_1=require("../resolveio-server-app"),mongo_manager_1=require("../managers/mongo.manager"),schema={_id:{type:String,optional:!0},metadata:{type:Object},"metadata.client":{type:String},"metadata.instance":{type:String},date:{type:Date},physical_total:{type:Number},physical_used:{type:Number},physical_free:{type:Number},virtual:{type:Number},private:{type:Number},physical:{type:Number}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=new mongo_manager_1.MongoManagerModel({collectionName:"monitor-memorys",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!1,createLogs:!1,checkSchema:!1,collectionOptions:{timeseries:{timeField:"date",granularity:"seconds",metaField:"metadata"},expireAfterSeconds:259200},skipCache:!0,bypassSession:!0}),exports.MonitorMemorys=e.collection_main,exports.MonitorMemorys.createIndex({"metadata.client":1,date:1}),exports.MonitorMemorys.createIndex({"metadata.client":1,"metadata.instance":1,date:1})):setTimeout(function(){initializeCollection()},1)}exports.MonitorMemorys=null,initializeCollection();
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MonitorMemorys=void 0;var mongo_manager_1=require("../managers/mongo.manager"),resolveio_server_app_1=require("../resolveio-server-app"),schema={_id:{type:String,optional:!0},metadata:{type:Object},"metadata.client":{type:String},"metadata.instance":{type:String},date:{type:Date},physical_total:{type:Number},physical_used:{type:Number},physical_free:{type:Number},virtual:{type:Number},private:{type:Number},physical:{type:Number}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=mongo_manager_1.MongoManagerModel.create({collectionName:"monitor-memorys",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!1,createLogs:!1,checkSchema:!1,collectionOptions:{timeseries:{timeField:"date",granularity:"seconds",metaField:"metadata"},expireAfterSeconds:259200},skipCache:!0,bypassSession:!0}),exports.MonitorMemorys=e.collection_main,exports.MonitorMemorys.createIndex({"metadata.client":1,date:1}),exports.MonitorMemorys.createIndex({"metadata.client":1,"metadata.instance":1,date:1})):setImmediate(function(){initializeCollection()})}exports.MonitorMemorys=null,initializeCollection();
2
2
  //# sourceMappingURL=monitor-memory.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/monitor-memory.collection.ts"],"names":["resolveio_server_app_1","require","mongo_manager_1","schema","_id","type","String","optional","metadata","Object","metadata.client","metadata.instance","date","Date","physical_total","Number","physical_used","physical_free","virtual","private","physical","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","timeseries","timeField","granularity","metaField","expireAfterSeconds","skipCache","bypassSession","exports","MonitorMemorys","collection_main","createIndex","setTimeout"],"mappings":"kGAAA,IAAAA,uBAAAC,QAAA,yBAAA,EACAC,gBAAAD,QAAA,2BAAA,EAGIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,SAAU,CACTH,KAAMI,M,EAEPC,kBAAmB,CAClBL,KAAMC,M,EAEPK,oBAAqB,CACpBN,KAAMC,M,EAEPM,KAAM,CACLP,KAAMQ,I,EAEPC,eAAgB,CACfT,KAAMU,M,EAEPC,cAAe,CACdX,KAAMU,M,EAEPE,cAAe,CACdZ,KAAMU,M,EAEPG,QAAS,CACRb,KAAMU,M,EAEPI,QAAS,CACRd,KAAMU,M,EAEPK,SAAU,CACTf,KAAMU,M,GAQR,SAASM,uBACR,IACOC,EADHtB,uBAAAuB,iBAAmBvB,uBAAAuB,gBAAgBC,UAAS,GAAMtB,gBAAAuB,mBAC/CH,EAAQ,IAAIpB,gBAAAuB,kBAAsC,CACvDC,eAAgB,kBAChBvB,OAAQA,OACRwB,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,CAClBC,WAAY,CACXC,UAAW,OACXC,YAAa,UACbC,UAAW,U,EAEZC,mBAAoB,M,EAErBC,UAAW,CAAA,EACXC,cAAe,CAAA,C,CACf,EACDC,QAAAC,eAAiBpB,EAAMqB,gBACvBF,QAAAC,eAAeE,YAAY,CAAClC,kBAAmB,EAAGE,KAAM,CAAC,CAAC,EAC1D6B,QAAAC,eAAeE,YAAY,CAAClC,kBAAmB,EAAGC,oBAAqB,EAAGC,KAAM,CAAC,CAAC,GAGlFiC,WAAW,WACVxB,qBAAoB,CACrB,EAAG,CAAC,CAEN,CAnCWoB,QAAAC,eAA6D,KAExErB,qBAAoB","file":"monitor-memory.collection.js","sourcesContent":["import { ResolveIOServer } from '../resolveio-server-app';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { MonitorMemoryModel } from '../models/monitor-memory.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tmetadata: {\n\t\ttype: Object\n\t},\n\t'metadata.client': {\n\t\ttype: String\n\t},\n\t'metadata.instance': {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tphysical_total: {\n\t\ttype: Number\n\t},\n\tphysical_used: {\n\t\ttype: Number\n\t},\n\tphysical_free: {\n\t\ttype: Number\n\t},\n\tvirtual: {\n\t\ttype: Number\n\t},\n\tprivate: {\n\t\ttype: Number\n\t},\n\tphysical: {\n\t\ttype: Number\n\t}\n};\n\nexport let MonitorMemorys: MongoManagerCollection<MonitorMemoryModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = new MongoManagerModel<MonitorMemoryModel>({\n\t\t\tcollectionName: 'monitor-memorys',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: false,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: false,\n\t\t\tcollectionOptions: {\n\t\t\t\ttimeseries: {\n\t\t\t\t\ttimeField: 'date',\n\t\t\t\t\tgranularity: 'seconds',\n\t\t\t\t\tmetaField: 'metadata'\n\t\t\t\t},\n\t\t\t\texpireAfterSeconds: 60 * 60 * 24 * 3\n\t\t\t},\n\t\t\tskipCache: true,\n\t\t\tbypassSession: true\n\t\t});\n\t\tMonitorMemorys = model.collection_main;\n\t\tMonitorMemorys.createIndex({'metadata.client': 1, date: 1});\n\t\tMonitorMemorys.createIndex({'metadata.client': 1, 'metadata.instance': 1, date: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/monitor-memory.collection.ts"],"names":["mongo_manager_1","require","resolveio_server_app_1","schema","_id","type","String","optional","metadata","Object","metadata.client","metadata.instance","date","Date","physical_total","Number","physical_used","physical_free","virtual","private","physical","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","create","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","timeseries","timeField","granularity","metaField","expireAfterSeconds","skipCache","bypassSession","exports","MonitorMemorys","collection_main","createIndex","setImmediate"],"mappings":"kGACA,IAAAA,gBAAAC,QAAA,2BAAA,EAEAC,uBAAAD,QAAA,yBAAA,EAEIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,SAAU,CACTH,KAAMI,M,EAEPC,kBAAmB,CAClBL,KAAMC,M,EAEPK,oBAAqB,CACpBN,KAAMC,M,EAEPM,KAAM,CACLP,KAAMQ,I,EAEPC,eAAgB,CACfT,KAAMU,M,EAEPC,cAAe,CACdX,KAAMU,M,EAEPE,cAAe,CACdZ,KAAMU,M,EAEPG,QAAS,CACRb,KAAMU,M,EAEPI,QAAS,CACRd,KAAMU,M,EAEPK,SAAU,CACTf,KAAMU,M,GAQR,SAASM,uBACR,IACOC,EADHpB,uBAAAqB,iBAAmBrB,uBAAAqB,gBAAgBC,UAAS,GAAMxB,gBAAAyB,mBAC/CH,EAAQtB,gBAAAyB,kBAAkBC,OAA2B,CAC1DC,eAAgB,kBAChBxB,OAAQA,OACRyB,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,CAClBC,WAAY,CACXC,UAAW,OACXC,YAAa,UACbC,UAAW,U,EAEZC,mBAAoB,M,EAErBC,UAAW,CAAA,EACXC,cAAe,CAAA,C,CACf,EACDC,QAAAC,eAAiBrB,EAAMsB,gBACvBF,QAAAC,eAAeE,YAAY,CAACnC,kBAAmB,EAAGE,KAAM,CAAC,CAAC,EAC1D8B,QAAAC,eAAeE,YAAY,CAACnC,kBAAmB,EAAGC,oBAAqB,EAAGC,KAAM,CAAC,CAAC,GAGlFkC,aAAa,WACZzB,qBAAoB,CACrB,CAAC,CAEH,CAnCWqB,QAAAC,eAA6D,KAExEtB,qBAAoB","file":"monitor-memory.collection.js","sourcesContent":["/* eslint-disable @typescript-eslint/no-floating-promises */\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { MonitorMemoryModel } from '../models/monitor-memory.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tmetadata: {\n\t\ttype: Object\n\t},\n\t'metadata.client': {\n\t\ttype: String\n\t},\n\t'metadata.instance': {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tphysical_total: {\n\t\ttype: Number\n\t},\n\tphysical_used: {\n\t\ttype: Number\n\t},\n\tphysical_free: {\n\t\ttype: Number\n\t},\n\tvirtual: {\n\t\ttype: Number\n\t},\n\tprivate: {\n\t\ttype: Number\n\t},\n\tphysical: {\n\t\ttype: Number\n\t}\n};\n\nexport let MonitorMemorys: MongoManagerCollection<MonitorMemoryModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<MonitorMemoryModel>({\n\t\t\tcollectionName: 'monitor-memorys',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: false,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: false,\n\t\t\tcollectionOptions: {\n\t\t\t\ttimeseries: {\n\t\t\t\t\ttimeField: 'date',\n\t\t\t\t\tgranularity: 'seconds',\n\t\t\t\t\tmetaField: 'metadata'\n\t\t\t\t},\n\t\t\t\texpireAfterSeconds: 60 * 60 * 24 * 3\n\t\t\t},\n\t\t\tskipCache: true,\n\t\t\tbypassSession: true\n\t\t});\n\t\tMonitorMemorys = model.collection_main;\n\t\tMonitorMemorys.createIndex({'metadata.client': 1, date: 1});\n\t\tMonitorMemorys.createIndex({'metadata.client': 1, 'metadata.instance': 1, date: 1});\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MonitorMongos=void 0;var resolveio_server_app_1=require("../resolveio-server-app"),mongo_manager_1=require("../managers/mongo.manager"),schema={_id:{type:String,optional:!0},metadata:{type:Object},"metadata.client":{type:String},"metadata.instance":{type:String},date:{type:Date},method:{type:String},doc_collection:{type:String},duration:{type:Number},query:{type:String}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=new mongo_manager_1.MongoManagerModel({collectionName:"monitor-mongos",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!1,createLogs:!1,checkSchema:!1,collectionOptions:{timeseries:{timeField:"date",granularity:"seconds",metaField:"metadata"},expireAfterSeconds:259200},skipCache:!0,bypassSession:!0}),exports.MonitorMongos=e.collection_main,exports.MonitorMongos.createIndex({"metadata.client":1,date:1}),exports.MonitorMongos.createIndex({"metadata.client":1,"metadata.instance":1,date:1})):setTimeout(function(){initializeCollection()},1)}exports.MonitorMongos=null,initializeCollection();
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MonitorMongos=void 0;var mongo_manager_1=require("../managers/mongo.manager"),resolveio_server_app_1=require("../resolveio-server-app"),schema={_id:{type:String,optional:!0},metadata:{type:Object},"metadata.client":{type:String},"metadata.instance":{type:String},date:{type:Date},method:{type:String},doc_collection:{type:String},duration:{type:Number},query:{type:String}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=mongo_manager_1.MongoManagerModel.create({collectionName:"monitor-mongos",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!1,createLogs:!1,checkSchema:!1,collectionOptions:{timeseries:{timeField:"date",granularity:"seconds",metaField:"metadata"},expireAfterSeconds:259200},skipCache:!0,bypassSession:!0}),exports.MonitorMongos=e.collection_main,exports.MonitorMongos.createIndex({"metadata.client":1,date:1}),exports.MonitorMongos.createIndex({"metadata.client":1,"metadata.instance":1,date:1})):setImmediate(function(){initializeCollection()})}exports.MonitorMongos=null,initializeCollection();
2
2
  //# sourceMappingURL=monitor-mongo.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/monitor-mongo.collection.ts"],"names":["resolveio_server_app_1","require","mongo_manager_1","schema","_id","type","String","optional","metadata","Object","metadata.client","metadata.instance","date","Date","method","doc_collection","duration","Number","query","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","timeseries","timeField","granularity","metaField","expireAfterSeconds","skipCache","bypassSession","exports","MonitorMongos","collection_main","createIndex","setTimeout"],"mappings":"iGAAA,IAAAA,uBAAAC,QAAA,yBAAA,EACAC,gBAAAD,QAAA,2BAAA,EAGIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,SAAU,CACTH,KAAMI,M,EAEPC,kBAAmB,CAClBL,KAAMC,M,EAEPK,oBAAqB,CACpBN,KAAMC,M,EAEPM,KAAM,CACLP,KAAMQ,I,EAEPC,OAAQ,CACPT,KAAMC,M,EAEPS,eAAgB,CACfV,KAAMC,M,EAEPU,SAAU,CACTX,KAAMY,M,EAEPC,MAAO,CACNb,KAAMC,M,GAQR,SAASa,uBACR,IACOC,EADHpB,uBAAAqB,iBAAmBrB,uBAAAqB,gBAAgBC,UAAS,GAAMpB,gBAAAqB,mBAC/CH,EAAQ,IAAIlB,gBAAAqB,kBAAqC,CACtDC,eAAgB,iBAChBrB,OAAQA,OACRsB,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,CAClBC,WAAY,CACXC,UAAW,OACXC,YAAa,UACbC,UAAW,U,EAEZC,mBAAoB,M,EAErBC,UAAW,CAAA,EACXC,cAAe,CAAA,C,CACf,EACDC,QAAAC,cAAgBpB,EAAMqB,gBACtBF,QAAAC,cAAcE,YAAY,CAAChC,kBAAmB,EAAGE,KAAM,CAAC,CAAC,EACzD2B,QAAAC,cAAcE,YAAY,CAAChC,kBAAmB,EAAGC,oBAAqB,EAAGC,KAAM,CAAC,CAAC,GAGjF+B,WAAW,WACVxB,qBAAoB,CACrB,EAAG,CAAC,CAEN,CAnCWoB,QAAAC,cAA2D,KAEtErB,qBAAoB","file":"monitor-mongo.collection.js","sourcesContent":["import { ResolveIOServer } from '../resolveio-server-app';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { MonitorMongoModel } from '../models/monitor-mongo.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tmetadata: {\n\t\ttype: Object\n\t},\n\t'metadata.client': {\n\t\ttype: String\n\t},\n\t'metadata.instance': {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tdoc_collection: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tquery: {\n\t\ttype: String\n\t}\n};\n\nexport let MonitorMongos: MongoManagerCollection<MonitorMongoModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = new MongoManagerModel<MonitorMongoModel>({\n\t\t\tcollectionName: 'monitor-mongos',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: false,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: false,\n\t\t\tcollectionOptions: {\n\t\t\t\ttimeseries: {\n\t\t\t\t\ttimeField: 'date',\n\t\t\t\t\tgranularity: 'seconds',\n\t\t\t\t\tmetaField: 'metadata'\n\t\t\t\t},\n\t\t\t\texpireAfterSeconds: 60 * 60 * 24 * 3\n\t\t\t},\n\t\t\tskipCache: true,\n\t\t\tbypassSession: true\n\t\t});\n\t\tMonitorMongos = model.collection_main;\n\t\tMonitorMongos.createIndex({'metadata.client': 1, date: 1});\n\t\tMonitorMongos.createIndex({'metadata.client': 1, 'metadata.instance': 1, date: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/monitor-mongo.collection.ts"],"names":["mongo_manager_1","require","resolveio_server_app_1","schema","_id","type","String","optional","metadata","Object","metadata.client","metadata.instance","date","Date","method","doc_collection","duration","Number","query","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","create","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","timeseries","timeField","granularity","metaField","expireAfterSeconds","skipCache","bypassSession","exports","MonitorMongos","collection_main","createIndex","setImmediate"],"mappings":"iGACA,IAAAA,gBAAAC,QAAA,2BAAA,EAEAC,uBAAAD,QAAA,yBAAA,EAEIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,SAAU,CACTH,KAAMI,M,EAEPC,kBAAmB,CAClBL,KAAMC,M,EAEPK,oBAAqB,CACpBN,KAAMC,M,EAEPM,KAAM,CACLP,KAAMQ,I,EAEPC,OAAQ,CACPT,KAAMC,M,EAEPS,eAAgB,CACfV,KAAMC,M,EAEPU,SAAU,CACTX,KAAMY,M,EAEPC,MAAO,CACNb,KAAMC,M,GAQR,SAASa,uBACR,IACOC,EADHlB,uBAAAmB,iBAAmBnB,uBAAAmB,gBAAgBC,UAAS,GAAMtB,gBAAAuB,mBAC/CH,EAAQpB,gBAAAuB,kBAAkBC,OAA0B,CACzDC,eAAgB,iBAChBtB,OAAQA,OACRuB,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,CAClBC,WAAY,CACXC,UAAW,OACXC,YAAa,UACbC,UAAW,U,EAEZC,mBAAoB,M,EAErBC,UAAW,CAAA,EACXC,cAAe,CAAA,C,CACf,EACDC,QAAAC,cAAgBrB,EAAMsB,gBACtBF,QAAAC,cAAcE,YAAY,CAACjC,kBAAmB,EAAGE,KAAM,CAAC,CAAC,EACzD4B,QAAAC,cAAcE,YAAY,CAACjC,kBAAmB,EAAGC,oBAAqB,EAAGC,KAAM,CAAC,CAAC,GAGjFgC,aAAa,WACZzB,qBAAoB,CACrB,CAAC,CAEH,CAnCWqB,QAAAC,cAA2D,KAEtEtB,qBAAoB","file":"monitor-mongo.collection.js","sourcesContent":["/* eslint-disable @typescript-eslint/no-floating-promises */\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { MonitorMongoModel } from '../models/monitor-mongo.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tmetadata: {\n\t\ttype: Object\n\t},\n\t'metadata.client': {\n\t\ttype: String\n\t},\n\t'metadata.instance': {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tdoc_collection: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tquery: {\n\t\ttype: String\n\t}\n};\n\nexport let MonitorMongos: MongoManagerCollection<MonitorMongoModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<MonitorMongoModel>({\n\t\t\tcollectionName: 'monitor-mongos',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: false,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: false,\n\t\t\tcollectionOptions: {\n\t\t\t\ttimeseries: {\n\t\t\t\t\ttimeField: 'date',\n\t\t\t\t\tgranularity: 'seconds',\n\t\t\t\t\tmetaField: 'metadata'\n\t\t\t\t},\n\t\t\t\texpireAfterSeconds: 60 * 60 * 24 * 3\n\t\t\t},\n\t\t\tskipCache: true,\n\t\t\tbypassSession: true\n\t\t});\n\t\tMonitorMongos = model.collection_main;\n\t\tMonitorMongos.createIndex({'metadata.client': 1, date: 1});\n\t\tMonitorMongos.createIndex({'metadata.client': 1, 'metadata.instance': 1, date: 1});\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Notifications=void 0;var resolveio_server_app_1=require("../resolveio-server-app"),mongo_manager_1=require("../managers/mongo.manager"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},name:{type:String},config:{type:Object,blackbox:!0,optional:!0}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=new mongo_manager_1.MongoManagerModel({collectionName:"notifications",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!1,checkSchema:!0,collectionOptions:null}),exports.Notifications=e.collection_main,exports.Notifications.createIndex({name:1},{unique:!0})):setTimeout(function(){initializeCollection()},1)}exports.Notifications=null,initializeCollection();
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Notifications=void 0;var mongo_manager_1=require("../managers/mongo.manager"),resolveio_server_app_1=require("../resolveio-server-app"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},name:{type:String},config:{type:Object,blackbox:!0,optional:!0}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=mongo_manager_1.MongoManagerModel.create({collectionName:"notifications",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!1,checkSchema:!0,collectionOptions:null}),exports.Notifications=e.collection_main,exports.Notifications.createIndex({name:1},{unique:!0})):setImmediate(function(){initializeCollection()})}exports.Notifications=null,initializeCollection();
2
2
  //# sourceMappingURL=notification.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/notification.collection.ts"],"names":["resolveio_server_app_1","require","mongo_manager_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","name","config","Object","blackbox","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","Notifications","collection_main","createIndex","unique","setTimeout"],"mappings":"iGAAA,IAAAA,uBAAAC,QAAA,yBAAA,EACAC,gBAAAD,QAAA,2BAAA,EAGIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,KAAM,CACLR,KAAMC,M,EAEPQ,OAAQ,CACPT,KAAMU,OACNC,SAAU,CAAA,EACVT,SAAU,CAAA,C,GAQZ,SAASU,uBACR,IACOC,EADHlB,uBAAAmB,iBAAmBnB,uBAAAmB,gBAAgBC,UAAS,GAAMlB,gBAAAmB,mBAC/CH,EAAQ,IAAIhB,gBAAAmB,kBAAqC,CACtDC,eAAgB,gBAChBnB,OAAQA,OACRoB,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,cAAgBb,EAAMc,gBACtBF,QAAAC,cAAcE,YAAY,CAACpB,KAAM,CAAC,EAAG,CAACqB,OAAQ,CAAA,CAAI,CAAC,GAGnDC,WAAW,WACVlB,qBAAoB,CACrB,EAAG,CAAC,CAEN,CAzBWa,QAAAC,cAA2D,KAEtEd,qBAAoB","file":"notification.collection.js","sourcesContent":["import { ResolveIOServer } from '../resolveio-server-app';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { NotificationModel } from '../models/notification.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tname: {\n\t\ttype: String\n\t},\n\tconfig: {\n\t\ttype: Object,\n\t\tblackbox: true,\n\t\toptional: true\n\t}\n};\n\nexport let Notifications: MongoManagerCollection<NotificationModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = new MongoManagerModel<NotificationModel>({\n\t\t\tcollectionName: 'notifications',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tNotifications = model.collection_main;\n\t\tNotifications.createIndex({name: 1}, {unique: true});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/notification.collection.ts"],"names":["mongo_manager_1","require","resolveio_server_app_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","name","config","Object","blackbox","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","create","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","Notifications","collection_main","createIndex","unique","setImmediate"],"mappings":"iGACA,IAAAA,gBAAAC,QAAA,2BAAA,EAEAC,uBAAAD,QAAA,yBAAA,EAEIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,KAAM,CACLR,KAAMC,M,EAEPQ,OAAQ,CACPT,KAAMU,OACNC,SAAU,CAAA,EACVT,SAAU,CAAA,C,GAQZ,SAASU,uBACR,IACOC,EADHhB,uBAAAiB,iBAAmBjB,uBAAAiB,gBAAgBC,UAAS,GAAMpB,gBAAAqB,mBAC/CH,EAAQlB,gBAAAqB,kBAAkBC,OAA0B,CACzDC,eAAgB,gBAChBpB,OAAQA,OACRqB,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,cAAgBd,EAAMe,gBACtBF,QAAAC,cAAcE,YAAY,CAACrB,KAAM,CAAC,EAAG,CAACsB,OAAQ,CAAA,CAAI,CAAC,GAGnDC,aAAa,WACZnB,qBAAoB,CACrB,CAAC,CAEH,CAzBWc,QAAAC,cAA2D,KAEtEf,qBAAoB","file":"notification.collection.js","sourcesContent":["/* eslint-disable @typescript-eslint/no-floating-promises */\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { NotificationModel } from '../models/notification.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\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\tconfig: {\n\t\ttype: Object,\n\t\tblackbox: true,\n\t\toptional: true\n\t}\n};\n\nexport let Notifications: MongoManagerCollection<NotificationModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<NotificationModel>({\n\t\t\tcollectionName: 'notifications',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tNotifications = model.collection_main;\n\t\tNotifications.createIndex({name: 1}, {unique: true});\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReportBuilderDashboardBuilders=void 0;var resolveio_server_app_1=require("../resolveio-server-app"),mongo_manager_1=require("../managers/mongo.manager"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},name:{type:String},date_created:{type:Date},id_user_created:{type:String},user_created:{type:String},num_rows:{type:Number},num_columns:{type:Number},report_rows:{type:Array},"report_rows.$":{type:Object},"report_rows.$.report_columns":{type:Array},"report_rows.$.report_columns.$":{type:Object},"report_rows.$.report_columns.$.id_report":{type:String},"report_rows.$.report_columns.$.report_name":{type:String},"report_rows.$.report_columns.$.report_type":{type:String},"report_rows.$.report_columns.$.display_type":{type:String},"report_rows.$.report_columns.$.display_values":{type:Array},"report_rows.$.report_columns.$.display_values.$":{type:String},"report_rows.$.report_columns.$.display_text":{type:String},"report_rows.$.report_columns.$.display_value":{type:String},other:{type:Object,blackbox:!0,optional:!0}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=new mongo_manager_1.MongoManagerModel({collectionName:"report-builder-dashboard-builders",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!0,checkSchema:!0,collectionOptions:null}),exports.ReportBuilderDashboardBuilders=e.collection_main,exports.ReportBuilderDashboardBuilders.createIndex({name:1}),exports.ReportBuilderDashboardBuilders.createIndex({date_created:1})):setTimeout(function(){initializeCollection()},1)}exports.ReportBuilderDashboardBuilders=null,initializeCollection();
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReportBuilderDashboardBuilders=void 0;var mongo_manager_1=require("../managers/mongo.manager"),resolveio_server_app_1=require("../resolveio-server-app"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},name:{type:String},date_created:{type:Date},id_user_created:{type:String},user_created:{type:String},num_rows:{type:Number},num_columns:{type:Number},report_rows:{type:Array},"report_rows.$":{type:Object},"report_rows.$.report_columns":{type:Array},"report_rows.$.report_columns.$":{type:Object},"report_rows.$.report_columns.$.id_report":{type:String},"report_rows.$.report_columns.$.report_name":{type:String},"report_rows.$.report_columns.$.report_type":{type:String},"report_rows.$.report_columns.$.display_type":{type:String},"report_rows.$.report_columns.$.display_values":{type:Array},"report_rows.$.report_columns.$.display_values.$":{type:String},"report_rows.$.report_columns.$.display_text":{type:String},"report_rows.$.report_columns.$.display_value":{type:String},other:{type:Object,blackbox:!0,optional:!0}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=mongo_manager_1.MongoManagerModel.create({collectionName:"report-builder-dashboard-builders",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!0,checkSchema:!0,collectionOptions:null}),exports.ReportBuilderDashboardBuilders=e.collection_main,exports.ReportBuilderDashboardBuilders.createIndex({name:1}),exports.ReportBuilderDashboardBuilders.createIndex({date_created:1})):setImmediate(function(){initializeCollection()})}exports.ReportBuilderDashboardBuilders=null,initializeCollection();
2
2
  //# sourceMappingURL=report-builder-dashboard-builder.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/report-builder-dashboard-builder.collection.ts"],"names":["resolveio_server_app_1","require","mongo_manager_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","name","date_created","id_user_created","user_created","num_rows","num_columns","report_rows","Array","report_rows.$","Object","report_rows.$.report_columns","report_rows.$.report_columns.$","report_rows.$.report_columns.$.id_report","report_rows.$.report_columns.$.report_name","report_rows.$.report_columns.$.report_type","report_rows.$.report_columns.$.display_type","report_rows.$.report_columns.$.display_values","report_rows.$.report_columns.$.display_values.$","report_rows.$.report_columns.$.display_text","report_rows.$.report_columns.$.display_value","other","blackbox","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","ReportBuilderDashboardBuilders","collection_main","createIndex","setTimeout"],"mappings":"kHAAA,IAAAA,uBAAAC,QAAA,yBAAA,EACAC,gBAAAD,QAAA,2BAAA,EAGIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,KAAM,CACLR,KAAMC,M,EAEPQ,aAAc,CACbT,KAAMM,I,EAEPI,gBAAiB,CAChBV,KAAMC,M,EAEPU,aAAc,CACbX,KAAMC,M,EAEPW,SAAU,CACTZ,KAAMI,M,EAEPS,YAAa,CACZb,KAAMI,M,EAEPU,YAAa,CACZd,KAAMe,K,EAEPC,gBAAiB,CAChBhB,KAAMiB,M,EAEPC,+BAAgC,CAC/BlB,KAAMe,K,EAEPI,iCAAkC,CACjCnB,KAAMiB,M,EAEPG,2CAA4C,CAC3CpB,KAAMC,M,EAEPoB,6CAA8C,CAC7CrB,KAAMC,M,EAEPqB,6CAA8C,CAC7CtB,KAAMC,M,EAEPsB,8CAA+C,CAC9CvB,KAAMC,M,EAEPuB,gDAAiD,CAChDxB,KAAMe,K,EAEPU,kDAAmD,CAClDzB,KAAMC,M,EAEPyB,8CAA+C,CAC9C1B,KAAMC,M,EAEP0B,+CAAgD,CAC/C3B,KAAMC,M,EAEP2B,MAAO,CACN5B,KAAMiB,OACNY,SAAU,CAAA,EACV3B,SAAU,CAAA,C,GAQZ,SAAS4B,uBACR,IACOC,EADHpC,uBAAAqC,iBAAmBrC,uBAAAqC,gBAAgBC,UAAS,GAAMpC,gBAAAqC,mBAC/CH,EAAQ,IAAIlC,gBAAAqC,kBAAsD,CACvEC,eAAgB,oCAChBrC,OAAQA,OACRsC,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,+BAAiCb,EAAMc,gBACvCF,QAAAC,+BAA+BE,YAAY,CAACtC,KAAM,CAAC,CAAC,EACpDmC,QAAAC,+BAA+BE,YAAY,CAACrC,aAAc,CAAC,CAAC,GAG5DsC,WAAW,WACVjB,qBAAoB,CACrB,EAAG,CAAC,CAEN,CA1BWa,QAAAC,+BAA6F,KAExGd,qBAAoB","file":"report-builder-dashboard-builder.collection.js","sourcesContent":["import { ResolveIOServer } from '../resolveio-server-app';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { ReportBuilderDashboardBuilderModel } from '../models/report-builder-dashboard-builder.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tname: {\n\t\ttype: String\n\t},\n\tdate_created: {\n\t\ttype: Date\n\t},\n\tid_user_created: {\n\t\ttype: String\n\t},\n\tuser_created: {\n\t\ttype: String\n\t},\n\tnum_rows: {\n\t\ttype: Number\n\t},\n\tnum_columns: {\n\t\ttype: Number\n\t},\n\treport_rows: {\n\t\ttype: Array\n\t},\n\t'report_rows.$': {\n\t\ttype: Object\n\t},\n\t'report_rows.$.report_columns': {\n\t\ttype: Array\n\t},\n\t'report_rows.$.report_columns.$': {\n\t\ttype: Object\n\t},\n\t'report_rows.$.report_columns.$.id_report': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.report_name': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.report_type': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.display_type': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.display_values': {\n\t\ttype: Array\n\t},\n\t'report_rows.$.report_columns.$.display_values.$': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.display_text': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.display_value': {\n\t\ttype: String\n\t},\n\tother: {\n\t\ttype: Object,\n\t\tblackbox: true,\n\t\toptional: true\n\t}\n};\n\nexport let ReportBuilderDashboardBuilders: MongoManagerCollection<ReportBuilderDashboardBuilderModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = new MongoManagerModel<ReportBuilderDashboardBuilderModel>({\n\t\t\tcollectionName: 'report-builder-dashboard-builders',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: true,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tReportBuilderDashboardBuilders = model.collection_main;\n\t\tReportBuilderDashboardBuilders.createIndex({name: 1});\n\t\tReportBuilderDashboardBuilders.createIndex({date_created: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/report-builder-dashboard-builder.collection.ts"],"names":["mongo_manager_1","require","resolveio_server_app_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","name","date_created","id_user_created","user_created","num_rows","num_columns","report_rows","Array","report_rows.$","Object","report_rows.$.report_columns","report_rows.$.report_columns.$","report_rows.$.report_columns.$.id_report","report_rows.$.report_columns.$.report_name","report_rows.$.report_columns.$.report_type","report_rows.$.report_columns.$.display_type","report_rows.$.report_columns.$.display_values","report_rows.$.report_columns.$.display_values.$","report_rows.$.report_columns.$.display_text","report_rows.$.report_columns.$.display_value","other","blackbox","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","create","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","ReportBuilderDashboardBuilders","collection_main","createIndex","setImmediate"],"mappings":"kHACA,IAAAA,gBAAAC,QAAA,2BAAA,EAEAC,uBAAAD,QAAA,yBAAA,EAEIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,KAAM,CACLR,KAAMC,M,EAEPQ,aAAc,CACbT,KAAMM,I,EAEPI,gBAAiB,CAChBV,KAAMC,M,EAEPU,aAAc,CACbX,KAAMC,M,EAEPW,SAAU,CACTZ,KAAMI,M,EAEPS,YAAa,CACZb,KAAMI,M,EAEPU,YAAa,CACZd,KAAMe,K,EAEPC,gBAAiB,CAChBhB,KAAMiB,M,EAEPC,+BAAgC,CAC/BlB,KAAMe,K,EAEPI,iCAAkC,CACjCnB,KAAMiB,M,EAEPG,2CAA4C,CAC3CpB,KAAMC,M,EAEPoB,6CAA8C,CAC7CrB,KAAMC,M,EAEPqB,6CAA8C,CAC7CtB,KAAMC,M,EAEPsB,8CAA+C,CAC9CvB,KAAMC,M,EAEPuB,gDAAiD,CAChDxB,KAAMe,K,EAEPU,kDAAmD,CAClDzB,KAAMC,M,EAEPyB,8CAA+C,CAC9C1B,KAAMC,M,EAEP0B,+CAAgD,CAC/C3B,KAAMC,M,EAEP2B,MAAO,CACN5B,KAAMiB,OACNY,SAAU,CAAA,EACV3B,SAAU,CAAA,C,GAQZ,SAAS4B,uBACR,IACOC,EADHlC,uBAAAmC,iBAAmBnC,uBAAAmC,gBAAgBC,UAAS,GAAMtC,gBAAAuC,mBAC/CH,EAAQpC,gBAAAuC,kBAAkBC,OAA2C,CAC1EC,eAAgB,oCAChBtC,OAAQA,OACRuC,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,+BAAiCd,EAAMe,gBACvCF,QAAAC,+BAA+BE,YAAY,CAACvC,KAAM,CAAC,CAAC,EACpDoC,QAAAC,+BAA+BE,YAAY,CAACtC,aAAc,CAAC,CAAC,GAG5DuC,aAAa,WACZlB,qBAAoB,CACrB,CAAC,CAEH,CA1BWc,QAAAC,+BAA6F,KAExGf,qBAAoB","file":"report-builder-dashboard-builder.collection.js","sourcesContent":["/* eslint-disable @typescript-eslint/no-floating-promises */\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { ReportBuilderDashboardBuilderModel } from '../models/report-builder-dashboard-builder.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\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\tdate_created: {\n\t\ttype: Date\n\t},\n\tid_user_created: {\n\t\ttype: String\n\t},\n\tuser_created: {\n\t\ttype: String\n\t},\n\tnum_rows: {\n\t\ttype: Number\n\t},\n\tnum_columns: {\n\t\ttype: Number\n\t},\n\treport_rows: {\n\t\ttype: Array\n\t},\n\t'report_rows.$': {\n\t\ttype: Object\n\t},\n\t'report_rows.$.report_columns': {\n\t\ttype: Array\n\t},\n\t'report_rows.$.report_columns.$': {\n\t\ttype: Object\n\t},\n\t'report_rows.$.report_columns.$.id_report': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.report_name': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.report_type': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.display_type': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.display_values': {\n\t\ttype: Array\n\t},\n\t'report_rows.$.report_columns.$.display_values.$': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.display_text': {\n\t\ttype: String\n\t},\n\t'report_rows.$.report_columns.$.display_value': {\n\t\ttype: String\n\t},\n\tother: {\n\t\ttype: Object,\n\t\tblackbox: true,\n\t\toptional: true\n\t}\n};\n\nexport let ReportBuilderDashboardBuilders: MongoManagerCollection<ReportBuilderDashboardBuilderModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<ReportBuilderDashboardBuilderModel>({\n\t\t\tcollectionName: 'report-builder-dashboard-builders',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: true,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tReportBuilderDashboardBuilders = model.collection_main;\n\t\tReportBuilderDashboardBuilders.createIndex({name: 1});\n\t\tReportBuilderDashboardBuilders.createIndex({date_created: 1});\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReportBuilderLibraries=void 0;var resolveio_server_app_1=require("../resolveio-server-app"),mongo_manager_1=require("../managers/mongo.manager"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},name:{type:String},id_user_create:{type:String},user_create:{type:String},date:{type:Date},reports:{type:Array},"reports.$":{type:Object},"reports.$.id_report":{type:String},"reports.$.report":{type:String},user_groups:{type:Array},"user_groups.$":{type:Object},"user_groups.$.id_user_group":{type:String},"user_groups.$.user_group":{type:String}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=new mongo_manager_1.MongoManagerModel({collectionName:"report-builder-libraries",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!0,checkSchema:!0,collectionOptions:null}),exports.ReportBuilderLibraries=e.collection_main,exports.ReportBuilderLibraries.createIndex({name:1}),exports.ReportBuilderLibraries.createIndex({id_user_create:1}),exports.ReportBuilderLibraries.createIndex({"user_groups.id_user_group":1})):setTimeout(function(){initializeCollection()},1)}exports.ReportBuilderLibraries=null,initializeCollection();
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReportBuilderLibraries=void 0;var mongo_manager_1=require("../managers/mongo.manager"),resolveio_server_app_1=require("../resolveio-server-app"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},name:{type:String},id_user_create:{type:String},user_create:{type:String},date:{type:Date},reports:{type:Array},"reports.$":{type:Object},"reports.$.id_report":{type:String},"reports.$.report":{type:String},user_groups:{type:Array},"user_groups.$":{type:Object},"user_groups.$.id_user_group":{type:String},"user_groups.$.user_group":{type:String}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=mongo_manager_1.MongoManagerModel.create({collectionName:"report-builder-libraries",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!0,checkSchema:!0,collectionOptions:null}),exports.ReportBuilderLibraries=e.collection_main,exports.ReportBuilderLibraries.createIndex({name:1}),exports.ReportBuilderLibraries.createIndex({id_user_create:1}),exports.ReportBuilderLibraries.createIndex({"user_groups.id_user_group":1})):setImmediate(function(){initializeCollection()})}exports.ReportBuilderLibraries=null,initializeCollection();
2
2
  //# sourceMappingURL=report-builder-library.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/report-builder-library.collection.ts"],"names":["resolveio_server_app_1","require","mongo_manager_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","name","id_user_create","user_create","date","reports","Array","reports.$","Object","reports.$.id_report","reports.$.report","user_groups","user_groups.$","user_groups.$.id_user_group","user_groups.$.user_group","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","ReportBuilderLibraries","collection_main","createIndex","user_groups.id_user_group","setTimeout"],"mappings":"0GAAA,IAAAA,uBAAAC,QAAA,yBAAA,EACAC,gBAAAD,QAAA,2BAAA,EAGIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,KAAM,CACLR,KAAMC,M,EAEPQ,eAAgB,CACfT,KAAMC,M,EAEPS,YAAa,CACZV,KAAMC,M,EAEPU,KAAM,CACLX,KAAMM,I,EAEPM,QAAS,CACRZ,KAAMa,K,EAEPC,YAAa,CACZd,KAAMe,M,EAEPC,sBAAuB,CACtBhB,KAAMC,M,EAEPgB,mBAAoB,CACnBjB,KAAMC,M,EAEPiB,YAAa,CACZlB,KAAMa,K,EAEPM,gBAAiB,CAChBnB,KAAMe,M,EAEPK,8BAA+B,CAC9BpB,KAAMC,M,EAEPoB,2BAA4B,CAC3BrB,KAAMC,M,GAUR,SAASqB,uBACR,IACOC,EADH5B,uBAAA6B,iBAAmB7B,uBAAA6B,gBAAgBC,UAAS,GAAM5B,gBAAA6B,mBAC/CH,EAAQ,IAAI1B,gBAAA6B,kBAA6C,CAC9DC,eAAgB,2BAChB7B,OAAQA,OACR8B,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,uBAAyBb,EAAMc,gBAC/BF,QAAAC,uBAAuBE,YAAY,CAAC9B,KAAM,CAAC,CAAC,EAC5C2B,QAAAC,uBAAuBE,YAAY,CAAC7B,eAAgB,CAAC,CAAC,EACtD0B,QAAAC,uBAAuBE,YAAY,CAACC,4BAA6B,CAAC,CAAC,GAGnEC,WAAW,WACVlB,qBAAoB,CACrB,EAAG,CAAC,CAEN,CA3BWa,QAAAC,uBAA4E,KAEvFd,qBAAoB","file":"report-builder-library.collection.js","sourcesContent":["import { ResolveIOServer } from '../resolveio-server-app';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { ReportBuilderLibraryModel } from '../models/report-builder-library.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tname: {\n\t\ttype: String\n\t},\n\tid_user_create: {\n\t\ttype: String\n\t},\n\tuser_create: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\treports: {\n\t\ttype: Array\n\t},\n\t'reports.$': {\n\t\ttype: Object\n\t},\n\t'reports.$.id_report': {\n\t\ttype: String\n\t},\n\t'reports.$.report': {\n\t\ttype: String\n\t},\n\tuser_groups: {\n\t\ttype: Array\n\t},\n\t'user_groups.$': {\n\t\ttype: Object\n\t},\n\t'user_groups.$.id_user_group': {\n\t\ttype: String\n\t},\n\t'user_groups.$.user_group': {\n\t\ttype: String\n\t}\n};\n\n\n\nexport let ReportBuilderLibraries: MongoManagerCollection<ReportBuilderLibraryModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = new MongoManagerModel<ReportBuilderLibraryModel>({\n\t\t\tcollectionName: 'report-builder-libraries',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: true,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tReportBuilderLibraries = model.collection_main;\n\t\tReportBuilderLibraries.createIndex({name: 1});\n\t\tReportBuilderLibraries.createIndex({id_user_create: 1});\n\t\tReportBuilderLibraries.createIndex({'user_groups.id_user_group': 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/report-builder-library.collection.ts"],"names":["mongo_manager_1","require","resolveio_server_app_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","name","id_user_create","user_create","date","reports","Array","reports.$","Object","reports.$.id_report","reports.$.report","user_groups","user_groups.$","user_groups.$.id_user_group","user_groups.$.user_group","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","create","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","ReportBuilderLibraries","collection_main","createIndex","user_groups.id_user_group","setImmediate"],"mappings":"0GACA,IAAAA,gBAAAC,QAAA,2BAAA,EAEAC,uBAAAD,QAAA,yBAAA,EAEIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,KAAM,CACLR,KAAMC,M,EAEPQ,eAAgB,CACfT,KAAMC,M,EAEPS,YAAa,CACZV,KAAMC,M,EAEPU,KAAM,CACLX,KAAMM,I,EAEPM,QAAS,CACRZ,KAAMa,K,EAEPC,YAAa,CACZd,KAAMe,M,EAEPC,sBAAuB,CACtBhB,KAAMC,M,EAEPgB,mBAAoB,CACnBjB,KAAMC,M,EAEPiB,YAAa,CACZlB,KAAMa,K,EAEPM,gBAAiB,CAChBnB,KAAMe,M,EAEPK,8BAA+B,CAC9BpB,KAAMC,M,EAEPoB,2BAA4B,CAC3BrB,KAAMC,M,GAUR,SAASqB,uBACR,IACOC,EADH1B,uBAAA2B,iBAAmB3B,uBAAA2B,gBAAgBC,UAAS,GAAM9B,gBAAA+B,mBAC/CH,EAAQ5B,gBAAA+B,kBAAkBC,OAAkC,CACjEC,eAAgB,2BAChB9B,OAAQA,OACR+B,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,uBAAyBd,EAAMe,gBAC/BF,QAAAC,uBAAuBE,YAAY,CAAC/B,KAAM,CAAC,CAAC,EAC5C4B,QAAAC,uBAAuBE,YAAY,CAAC9B,eAAgB,CAAC,CAAC,EACtD2B,QAAAC,uBAAuBE,YAAY,CAACC,4BAA6B,CAAC,CAAC,GAGnEC,aAAa,WACZnB,qBAAoB,CACrB,CAAC,CAEH,CA3BWc,QAAAC,uBAA4E,KAEvFf,qBAAoB","file":"report-builder-library.collection.js","sourcesContent":["/* eslint-disable @typescript-eslint/no-floating-promises */\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { ReportBuilderLibraryModel } from '../models/report-builder-library.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\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\tid_user_create: {\n\t\ttype: String\n\t},\n\tuser_create: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\treports: {\n\t\ttype: Array\n\t},\n\t'reports.$': {\n\t\ttype: Object\n\t},\n\t'reports.$.id_report': {\n\t\ttype: String\n\t},\n\t'reports.$.report': {\n\t\ttype: String\n\t},\n\tuser_groups: {\n\t\ttype: Array\n\t},\n\t'user_groups.$': {\n\t\ttype: Object\n\t},\n\t'user_groups.$.id_user_group': {\n\t\ttype: String\n\t},\n\t'user_groups.$.user_group': {\n\t\ttype: String\n\t}\n};\n\n\n\nexport let ReportBuilderLibraries: MongoManagerCollection<ReportBuilderLibraryModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<ReportBuilderLibraryModel>({\n\t\t\tcollectionName: 'report-builder-libraries',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: true,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tReportBuilderLibraries = model.collection_main;\n\t\tReportBuilderLibraries.createIndex({name: 1});\n\t\tReportBuilderLibraries.createIndex({id_user_create: 1});\n\t\tReportBuilderLibraries.createIndex({'user_groups.id_user_group': 1});\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReportBuilderReportVersions=exports.ReportBuilderReports=void 0;var resolveio_server_app_1=require("../resolveio-server-app"),mongo_manager_1=require("../managers/mongo.manager"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},collection_root:{type:String},report_name:{type:String},fields_sort:{type:Array},"fields_sort.$":{type:Object},"fields_sort.$.field":{type:String},"fields_sort.$.order":{type:String},fields_filter:{type:Array},"fields_filter.$":{type:Object,blackbox:!0},fields_custom:{type:Array},"fields_custom.$":{type:Object,blackbox:!0},fields_selected:{type:Array},"fields_selected.$":{type:Object,blackbox:!0},fields_total:{type:Array},"fields_total.$":{type:Object,blackbox:!0},fields_link:{type:Array},"fields_link.$":{type:Object,blackbox:!0},id_user:{type:String},user:{type:String},date_created:{type:Date},shared_users:{type:Array},"shared_users.$":{type:String},type:{type:String},groups_row:{type:Array},"groups_row.$":{type:Object,blackbox:!0},groups_column:{type:Array},"groups_column.$":{type:Object,blackbox:!0},group_type:{type:String},id_date_field:{type:String,optional:!0},date_interval:{type:String,optional:!0}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=new mongo_manager_1.MongoManagerModel({collectionName:"report-builder-reports",schema:schema,useVersionCollection:!0,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!0,checkSchema:!0,collectionOptions:null}),exports.ReportBuilderReports=e.collection_main,exports.ReportBuilderReports.createIndex({id_user:1}),exports.ReportBuilderReports.createIndex({shared_users:1}),exports.ReportBuilderReports.createIndex({report_name:1,collection_root:1}),exports.ReportBuilderReportVersions=e.collection_version):setTimeout(function(){initializeCollection()},1)}exports.ReportBuilderReports=null,exports.ReportBuilderReportVersions=null,initializeCollection();
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReportBuilderReportVersions=exports.ReportBuilderReports=void 0;var mongo_manager_1=require("../managers/mongo.manager"),resolveio_server_app_1=require("../resolveio-server-app"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},collection_root:{type:String},report_name:{type:String},fields_sort:{type:Array},"fields_sort.$":{type:Object},"fields_sort.$.field":{type:String},"fields_sort.$.order":{type:String},fields_filter:{type:Array},"fields_filter.$":{type:Object,blackbox:!0},fields_custom:{type:Array},"fields_custom.$":{type:Object,blackbox:!0},fields_selected:{type:Array},"fields_selected.$":{type:Object,blackbox:!0},fields_total:{type:Array},"fields_total.$":{type:Object,blackbox:!0},fields_link:{type:Array},"fields_link.$":{type:Object,blackbox:!0},id_user:{type:String},user:{type:String},date_created:{type:Date},shared_users:{type:Array},"shared_users.$":{type:String},type:{type:String},groups_row:{type:Array},"groups_row.$":{type:Object,blackbox:!0},groups_column:{type:Array},"groups_column.$":{type:Object,blackbox:!0},group_type:{type:String},id_date_field:{type:String,optional:!0},date_interval:{type:String,optional:!0}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=mongo_manager_1.MongoManagerModel.create({collectionName:"report-builder-reports",schema:schema,useVersionCollection:!0,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!0,checkSchema:!0,collectionOptions:null}),exports.ReportBuilderReports=e.collection_main,exports.ReportBuilderReports.createIndex({id_user:1}),exports.ReportBuilderReports.createIndex({shared_users:1}),exports.ReportBuilderReports.createIndex({report_name:1,collection_root:1}),exports.ReportBuilderReportVersions=e.collection_version):setImmediate(function(){initializeCollection()})}exports.ReportBuilderReports=null,exports.ReportBuilderReportVersions=null,initializeCollection();
2
2
  //# sourceMappingURL=report-builder-report.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/report-builder-report.collection.ts"],"names":["resolveio_server_app_1","require","mongo_manager_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","collection_root","report_name","fields_sort","Array","fields_sort.$","Object","fields_sort.$.field","fields_sort.$.order","fields_filter","fields_filter.$","blackbox","fields_custom","fields_custom.$","fields_selected","fields_selected.$","fields_total","fields_total.$","fields_link","fields_link.$","id_user","user","date_created","shared_users","shared_users.$","groups_row","groups_row.$","groups_column","groups_column.$","group_type","id_date_field","date_interval","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","ReportBuilderReports","collection_main","createIndex","ReportBuilderReportVersions","collection_version","setTimeout"],"mappings":"4IAAA,IAAAA,uBAAAC,QAAA,yBAAA,EACAC,gBAAAD,QAAA,2BAAA,EAGIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,gBAAiB,CAChBR,KAAMC,M,EAEPQ,YAAa,CACZT,KAAMC,M,EAEPS,YAAa,CACZV,KAAMW,K,EAEPC,gBAAiB,CAChBZ,KAAMa,M,EAEPC,sBAAuB,CACtBd,KAAMC,M,EAEPc,sBAAuB,CACtBf,KAAMC,M,EAEPe,cAAe,CACdhB,KAAMW,K,EAEPM,kBAAmB,CAClBjB,KAAMa,OACNK,SAAU,CAAA,C,EAEXC,cAAe,CACdnB,KAAMW,K,EAEPS,kBAAmB,CAClBpB,KAAMa,OACNK,SAAU,CAAA,C,EAEXG,gBAAiB,CAChBrB,KAAMW,K,EAEPW,oBAAqB,CACpBtB,KAAMa,OACNK,SAAU,CAAA,C,EAEXK,aAAc,CACbvB,KAAMW,K,EAEPa,iBAAkB,CACjBxB,KAAMa,OACNK,SAAU,CAAA,C,EAEXO,YAAa,CACZzB,KAAMW,K,EAEPe,gBAAiB,CAChB1B,KAAMa,OACNK,SAAU,CAAA,C,EAEXS,QAAS,CACR3B,KAAMC,M,EAEP2B,KAAM,CACL5B,KAAMC,M,EAEP4B,aAAc,CACb7B,KAAMM,I,EAEPwB,aAAc,CACb9B,KAAMW,K,EAEPoB,iBAAkB,CACjB/B,KAAMC,M,EAEPD,KAAM,CACLA,KAAMC,M,EAEP+B,WAAY,CACXhC,KAAMW,K,EAEPsB,eAAgB,CACfjC,KAAMa,OACNK,SAAU,CAAA,C,EAEXgB,cAAe,CACdlC,KAAMW,K,EAEPwB,kBAAmB,CAClBnC,KAAMa,OACNK,SAAU,CAAA,C,EAEXkB,WAAY,CACXpC,KAAMC,M,EAEPoC,cAAe,CACdrC,KAAMC,OACNC,SAAU,CAAA,C,EAEXoC,cAAe,CACdtC,KAAMC,OACNC,SAAU,CAAA,C,GASZ,SAASqC,uBACR,IACOC,EADH7C,uBAAA8C,iBAAmB9C,uBAAA8C,gBAAgBC,UAAS,GAAM7C,gBAAA8C,mBAC/CH,EAAQ,IAAI3C,gBAAA8C,kBAA4C,CAC7DC,eAAgB,yBAChB9C,OAAQA,OACR+C,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,qBAAuBb,EAAMc,gBAC7BF,QAAAC,qBAAqBE,YAAY,CAAC5B,QAAS,CAAC,CAAC,EAC7CyB,QAAAC,qBAAqBE,YAAY,CAACzB,aAAc,CAAC,CAAC,EAClDsB,QAAAC,qBAAqBE,YAAY,CAAC9C,YAAa,EAAGD,gBAAiB,CAAC,CAAC,EACrE4C,QAAAI,4BAA8BhB,EAAMiB,oBAGpCC,WAAW,WACVnB,qBAAoB,CACrB,EAAG,CAAC,CAEN,CA7BWa,QAAAC,qBAAyE,KACzED,QAAAI,4BAAgF,KAE3FjB,qBAAoB","file":"report-builder-report.collection.js","sourcesContent":["import { ResolveIOServer } from '../resolveio-server-app';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { ReportBuilderReportModel } from '../models/report-builder-report.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\tcollection_root: {\n\t\ttype: String\n\t},\n\treport_name: {\n\t\ttype: String\n\t},\n\tfields_sort: {\n\t\ttype: Array\n\t},\n\t'fields_sort.$': {\n\t\ttype: Object\n\t},\n\t'fields_sort.$.field': {\n\t\ttype: String\n\t},\n\t'fields_sort.$.order': {\n\t\ttype: String\n\t},\n\tfields_filter: {\n\t\ttype: Array\n\t},\n\t'fields_filter.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_custom: {\n\t\ttype: Array\n\t},\n\t'fields_custom.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_selected: {\n\t\ttype: Array\n\t},\n\t'fields_selected.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_total: {\n\t\ttype: Array\n\t},\n\t'fields_total.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_link: {\n\t\ttype: Array\n\t},\n\t'fields_link.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tdate_created: {\n\t\ttype: Date\n\t},\n\tshared_users: {\n\t\ttype: Array\n\t},\n\t'shared_users.$': {\n\t\ttype: String\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tgroups_row: {\n\t\ttype: Array\n\t},\n\t'groups_row.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tgroups_column: {\n\t\ttype: Array\n\t},\n\t'groups_column.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tgroup_type: {\n\t\ttype: String\n\t},\n\tid_date_field: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tdate_interval: {\n\t\ttype: String,\n\t\toptional: true\n\t}\n};\n\nexport let ReportBuilderReports: MongoManagerCollection<ReportBuilderReportModel> = null;\nexport let ReportBuilderReportVersions: MongoManagerCollection<ReportBuilderReportModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = new MongoManagerModel<ReportBuilderReportModel>({\n\t\t\tcollectionName: 'report-builder-reports',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: true,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: true,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tReportBuilderReports = model.collection_main;\n\t\tReportBuilderReports.createIndex({id_user: 1});\n\t\tReportBuilderReports.createIndex({shared_users: 1});\n\t\tReportBuilderReports.createIndex({report_name: 1, collection_root: 1});\n\t\tReportBuilderReportVersions = model.collection_version;\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/report-builder-report.collection.ts"],"names":["mongo_manager_1","require","resolveio_server_app_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","collection_root","report_name","fields_sort","Array","fields_sort.$","Object","fields_sort.$.field","fields_sort.$.order","fields_filter","fields_filter.$","blackbox","fields_custom","fields_custom.$","fields_selected","fields_selected.$","fields_total","fields_total.$","fields_link","fields_link.$","id_user","user","date_created","shared_users","shared_users.$","groups_row","groups_row.$","groups_column","groups_column.$","group_type","id_date_field","date_interval","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","create","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","ReportBuilderReports","collection_main","createIndex","ReportBuilderReportVersions","collection_version","setImmediate"],"mappings":"4IACA,IAAAA,gBAAAC,QAAA,2BAAA,EAEAC,uBAAAD,QAAA,yBAAA,EAEIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,gBAAiB,CAChBR,KAAMC,M,EAEPQ,YAAa,CACZT,KAAMC,M,EAEPS,YAAa,CACZV,KAAMW,K,EAEPC,gBAAiB,CAChBZ,KAAMa,M,EAEPC,sBAAuB,CACtBd,KAAMC,M,EAEPc,sBAAuB,CACtBf,KAAMC,M,EAEPe,cAAe,CACdhB,KAAMW,K,EAEPM,kBAAmB,CAClBjB,KAAMa,OACNK,SAAU,CAAA,C,EAEXC,cAAe,CACdnB,KAAMW,K,EAEPS,kBAAmB,CAClBpB,KAAMa,OACNK,SAAU,CAAA,C,EAEXG,gBAAiB,CAChBrB,KAAMW,K,EAEPW,oBAAqB,CACpBtB,KAAMa,OACNK,SAAU,CAAA,C,EAEXK,aAAc,CACbvB,KAAMW,K,EAEPa,iBAAkB,CACjBxB,KAAMa,OACNK,SAAU,CAAA,C,EAEXO,YAAa,CACZzB,KAAMW,K,EAEPe,gBAAiB,CAChB1B,KAAMa,OACNK,SAAU,CAAA,C,EAEXS,QAAS,CACR3B,KAAMC,M,EAEP2B,KAAM,CACL5B,KAAMC,M,EAEP4B,aAAc,CACb7B,KAAMM,I,EAEPwB,aAAc,CACb9B,KAAMW,K,EAEPoB,iBAAkB,CACjB/B,KAAMC,M,EAEPD,KAAM,CACLA,KAAMC,M,EAEP+B,WAAY,CACXhC,KAAMW,K,EAEPsB,eAAgB,CACfjC,KAAMa,OACNK,SAAU,CAAA,C,EAEXgB,cAAe,CACdlC,KAAMW,K,EAEPwB,kBAAmB,CAClBnC,KAAMa,OACNK,SAAU,CAAA,C,EAEXkB,WAAY,CACXpC,KAAMC,M,EAEPoC,cAAe,CACdrC,KAAMC,OACNC,SAAU,CAAA,C,EAEXoC,cAAe,CACdtC,KAAMC,OACNC,SAAU,CAAA,C,GASZ,SAASqC,uBACR,IACOC,EADH3C,uBAAA4C,iBAAmB5C,uBAAA4C,gBAAgBC,UAAS,GAAM/C,gBAAAgD,mBAC/CH,EAAQ7C,gBAAAgD,kBAAkBC,OAAiC,CAChEC,eAAgB,yBAChB/C,OAAQA,OACRgD,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,qBAAuBd,EAAMe,gBAC7BF,QAAAC,qBAAqBE,YAAY,CAAC7B,QAAS,CAAC,CAAC,EAC7C0B,QAAAC,qBAAqBE,YAAY,CAAC1B,aAAc,CAAC,CAAC,EAClDuB,QAAAC,qBAAqBE,YAAY,CAAC/C,YAAa,EAAGD,gBAAiB,CAAC,CAAC,EACrE6C,QAAAI,4BAA8BjB,EAAMkB,oBAGpCC,aAAa,WACZpB,qBAAoB,CACrB,CAAC,CAEH,CA7BWc,QAAAC,qBAAyE,KACzED,QAAAI,4BAAgF,KAE3FlB,qBAAoB","file":"report-builder-report.collection.js","sourcesContent":["/* eslint-disable @typescript-eslint/no-floating-promises */\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { ReportBuilderReportModel } from '../models/report-builder-report.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\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\tcollection_root: {\n\t\ttype: String\n\t},\n\treport_name: {\n\t\ttype: String\n\t},\n\tfields_sort: {\n\t\ttype: Array\n\t},\n\t'fields_sort.$': {\n\t\ttype: Object\n\t},\n\t'fields_sort.$.field': {\n\t\ttype: String\n\t},\n\t'fields_sort.$.order': {\n\t\ttype: String\n\t},\n\tfields_filter: {\n\t\ttype: Array\n\t},\n\t'fields_filter.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_custom: {\n\t\ttype: Array\n\t},\n\t'fields_custom.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_selected: {\n\t\ttype: Array\n\t},\n\t'fields_selected.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_total: {\n\t\ttype: Array\n\t},\n\t'fields_total.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_link: {\n\t\ttype: Array\n\t},\n\t'fields_link.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tdate_created: {\n\t\ttype: Date\n\t},\n\tshared_users: {\n\t\ttype: Array\n\t},\n\t'shared_users.$': {\n\t\ttype: String\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tgroups_row: {\n\t\ttype: Array\n\t},\n\t'groups_row.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tgroups_column: {\n\t\ttype: Array\n\t},\n\t'groups_column.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tgroup_type: {\n\t\ttype: String\n\t},\n\tid_date_field: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tdate_interval: {\n\t\ttype: String,\n\t\toptional: true\n\t}\n};\n\nexport let ReportBuilderReports: MongoManagerCollection<ReportBuilderReportModel> = null;\nexport let ReportBuilderReportVersions: MongoManagerCollection<ReportBuilderReportModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<ReportBuilderReportModel>({\n\t\t\tcollectionName: 'report-builder-reports',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: true,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: true,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tReportBuilderReports = model.collection_main;\n\t\tReportBuilderReports.createIndex({id_user: 1});\n\t\tReportBuilderReports.createIndex({shared_users: 1});\n\t\tReportBuilderReports.createIndex({report_name: 1, collection_root: 1});\n\t\tReportBuilderReportVersions = model.collection_version;\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserGroupVersions=exports.UserGroups=void 0;var resolveio_server_app_1=require("../resolveio-server-app"),mongo_manager_1=require("../managers/mongo.manager"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},name:{type:String},landing_page:{type:String,optional:!0},permissions:{type:Array},"permissions.$":{type:Object},"permissions.$.name":{type:String},"permissions.$.selected":{type:Boolean},"permissions.$.views":{type:Array},"permissions.$.views.$":{type:Object},"permissions.$.views.$.link":{type:String},"permissions.$.views.$.selected":{type:Boolean},notifications:{type:Array},"notifications.$":{type:Object,blackbox:!0}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=new mongo_manager_1.MongoManagerModel({collectionName:"user-groups",schema:schema,useVersionCollection:!0,useReportBuilder:!0,reportBuilderLookupTables:[],timestamps:!0,createLogs:!1,checkSchema:!0,collectionOptions:null}),exports.UserGroups=e.collection_main,exports.UserGroups.createIndex({name:1}),exports.UserGroupVersions=e.collection_version):setTimeout(function(){initializeCollection()},1)}exports.UserGroups=null,exports.UserGroupVersions=null,initializeCollection();
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserGroupVersions=exports.UserGroups=void 0;var mongo_manager_1=require("../managers/mongo.manager"),resolveio_server_app_1=require("../resolveio-server-app"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},name:{type:String},landing_page:{type:String,optional:!0},permissions:{type:Array},"permissions.$":{type:Object},"permissions.$.name":{type:String},"permissions.$.selected":{type:Boolean},"permissions.$.views":{type:Array},"permissions.$.views.$":{type:Object},"permissions.$.views.$.link":{type:String},"permissions.$.views.$.selected":{type:Boolean},notifications:{type:Array},"notifications.$":{type:Object,blackbox:!0}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=mongo_manager_1.MongoManagerModel.create({collectionName:"user-groups",schema:schema,useVersionCollection:!0,useReportBuilder:!0,reportBuilderLookupTables:[],timestamps:!0,createLogs:!1,checkSchema:!0,collectionOptions:null}),exports.UserGroups=e.collection_main,exports.UserGroups.createIndex({name:1}),exports.UserGroupVersions=e.collection_version):setImmediate(function(){initializeCollection()})}exports.UserGroups=null,exports.UserGroupVersions=null,initializeCollection();
2
2
  //# sourceMappingURL=user-group.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/user-group.collection.ts"],"names":["resolveio_server_app_1","require","mongo_manager_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","name","landing_page","permissions","Array","permissions.$","Object","permissions.$.name","permissions.$.selected","Boolean","permissions.$.views","permissions.$.views.$","permissions.$.views.$.link","permissions.$.views.$.selected","notifications","notifications.$","blackbox","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","UserGroups","collection_main","createIndex","UserGroupVersions","collection_version","setTimeout"],"mappings":"wHAAA,IAAAA,uBAAAC,QAAA,yBAAA,EACAC,gBAAAD,QAAA,2BAAA,EAGIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,KAAM,CACLR,KAAMC,M,EAEPQ,aAAc,CACbT,KAAMC,OACNC,SAAU,CAAA,C,EAEXQ,YAAa,CACZV,KAAMW,K,EAEPC,gBAAiB,CAChBZ,KAAOa,M,EAERC,qBAAsB,CACrBd,KAAMC,M,EAEPc,yBAA0B,CACzBf,KAAMgB,O,EAEPC,sBAAuB,CACtBjB,KAAMW,K,EAEPO,wBAAyB,CACxBlB,KAAMa,M,EAEPM,6BAA8B,CAC7BnB,KAAMC,M,EAEPmB,iCAAkC,CACjCpB,KAAMgB,O,EAEPK,cAAe,CACdrB,KAAMW,K,EAEPW,kBAAmB,CAClBtB,KAAOa,OACPU,SAAU,CAAA,C,GASZ,SAASC,uBACR,IACOC,EADH9B,uBAAA+B,iBAAmB/B,uBAAA+B,gBAAgBC,UAAS,GAAM9B,gBAAA+B,mBAC/CH,EAAQ,IAAI5B,gBAAA+B,kBAAkC,CACnDC,eAAgB,cAChB/B,OAAQA,OACRgC,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,WAAab,EAAMc,gBACnBF,QAAAC,WAAWE,YAAY,CAAChC,KAAM,CAAC,CAAC,EAChC6B,QAAAI,kBAAoBhB,EAAMiB,oBAG1BC,WAAW,WACVnB,qBAAoB,CACrB,EAAG,CAAC,CAEN,CA3BWa,QAAAC,WAAqD,KACrDD,QAAAI,kBAA4D,KAEvEjB,qBAAoB","file":"user-group.collection.js","sourcesContent":["import { ResolveIOServer } from '../resolveio-server-app';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { UserGroupModel } from '../models/user-group.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tname: {\n\t\ttype: String\n\t},\n\tlanding_page: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tpermissions: {\n\t\ttype: Array\n\t},\n\t'permissions.$': {\n\t\ttype: Object\n\t},\n\t'permissions.$.name': {\n\t\ttype: String\n\t},\n\t'permissions.$.selected': {\n\t\ttype: Boolean\n\t},\n\t'permissions.$.views': {\n\t\ttype: Array\n\t},\n\t'permissions.$.views.$': {\n\t\ttype: Object\n\t},\n\t'permissions.$.views.$.link': {\n\t\ttype: String\n\t},\n\t'permissions.$.views.$.selected': {\n\t\ttype: Boolean\n\t},\n\tnotifications: {\n\t\ttype: Array\n\t},\n\t'notifications.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n};\n\nexport let UserGroups: MongoManagerCollection<UserGroupModel> = null;\nexport let UserGroupVersions: MongoManagerCollection<UserGroupModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = new MongoManagerModel<UserGroupModel>({\n\t\t\tcollectionName: 'user-groups',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: true,\n\t\t\tuseReportBuilder: true,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tUserGroups = model.collection_main;\n\t\tUserGroups.createIndex({name: 1});\n\t\tUserGroupVersions = model.collection_version;\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/user-group.collection.ts"],"names":["mongo_manager_1","require","resolveio_server_app_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","name","landing_page","permissions","Array","permissions.$","Object","permissions.$.name","permissions.$.selected","Boolean","permissions.$.views","permissions.$.views.$","permissions.$.views.$.link","permissions.$.views.$.selected","notifications","notifications.$","blackbox","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","create","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","UserGroups","collection_main","createIndex","UserGroupVersions","collection_version","setImmediate"],"mappings":"wHACA,IAAAA,gBAAAC,QAAA,2BAAA,EAEAC,uBAAAD,QAAA,yBAAA,EAEIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,KAAM,CACLR,KAAMC,M,EAEPQ,aAAc,CACbT,KAAMC,OACNC,SAAU,CAAA,C,EAEXQ,YAAa,CACZV,KAAMW,K,EAEPC,gBAAiB,CAChBZ,KAAOa,M,EAERC,qBAAsB,CACrBd,KAAMC,M,EAEPc,yBAA0B,CACzBf,KAAMgB,O,EAEPC,sBAAuB,CACtBjB,KAAMW,K,EAEPO,wBAAyB,CACxBlB,KAAMa,M,EAEPM,6BAA8B,CAC7BnB,KAAMC,M,EAEPmB,iCAAkC,CACjCpB,KAAMgB,O,EAEPK,cAAe,CACdrB,KAAMW,K,EAEPW,kBAAmB,CAClBtB,KAAOa,OACPU,SAAU,CAAA,C,GASZ,SAASC,uBACR,IACOC,EADH5B,uBAAA6B,iBAAmB7B,uBAAA6B,gBAAgBC,UAAS,GAAMhC,gBAAAiC,mBAC/CH,EAAQ9B,gBAAAiC,kBAAkBC,OAAuB,CACtDC,eAAgB,cAChBhC,OAAQA,OACRiC,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,WAAad,EAAMe,gBACnBF,QAAAC,WAAWE,YAAY,CAACjC,KAAM,CAAC,CAAC,EAChC8B,QAAAI,kBAAoBjB,EAAMkB,oBAG1BC,aAAa,WACZpB,qBAAoB,CACrB,CAAC,CAEH,CA3BWc,QAAAC,WAAqD,KACrDD,QAAAI,kBAA4D,KAEvElB,qBAAoB","file":"user-group.collection.js","sourcesContent":["/* eslint-disable @typescript-eslint/no-floating-promises */\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { UserGroupModel } from '../models/user-group.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\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\tlanding_page: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tpermissions: {\n\t\ttype: Array\n\t},\n\t'permissions.$': {\n\t\ttype: Object\n\t},\n\t'permissions.$.name': {\n\t\ttype: String\n\t},\n\t'permissions.$.selected': {\n\t\ttype: Boolean\n\t},\n\t'permissions.$.views': {\n\t\ttype: Array\n\t},\n\t'permissions.$.views.$': {\n\t\ttype: Object\n\t},\n\t'permissions.$.views.$.link': {\n\t\ttype: String\n\t},\n\t'permissions.$.views.$.selected': {\n\t\ttype: Boolean\n\t},\n\tnotifications: {\n\t\ttype: Array\n\t},\n\t'notifications.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n};\n\nexport let UserGroups: MongoManagerCollection<UserGroupModel> = null;\nexport let UserGroupVersions: MongoManagerCollection<UserGroupModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<UserGroupModel>({\n\t\t\tcollectionName: 'user-groups',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: true,\n\t\t\tuseReportBuilder: true,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tUserGroups = model.collection_main;\n\t\tUserGroups.createIndex({name: 1});\n\t\tUserGroupVersions = model.collection_version;\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserGuides=void 0;var resolveio_server_app_1=require("../resolveio-server-app"),mongo_manager_1=require("../managers/mongo.manager"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},link:{type:String},label:{type:String},message:{type:String}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=new mongo_manager_1.MongoManagerModel({collectionName:"user-guides",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!1,checkSchema:!0,collectionOptions:null}),exports.UserGuides=e.collection_main):setTimeout(function(){initializeCollection()},1)}exports.UserGuides=null,initializeCollection();
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserGuides=void 0;var mongo_manager_1=require("../managers/mongo.manager"),resolveio_server_app_1=require("../resolveio-server-app"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},link:{type:String},label:{type:String},message:{type:String}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=mongo_manager_1.MongoManagerModel.create({collectionName:"user-guides",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!1,checkSchema:!0,collectionOptions:null}),exports.UserGuides=e.collection_main):setImmediate(function(){initializeCollection()})}exports.UserGuides=null,initializeCollection();
2
2
  //# sourceMappingURL=user-guide.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/user-guide.collection.ts"],"names":["resolveio_server_app_1","require","mongo_manager_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","link","label","message","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","UserGuides","collection_main","setTimeout"],"mappings":"8FAAA,IAAAA,uBAAAC,QAAA,yBAAA,EACAC,gBAAAD,QAAA,2BAAA,EAGIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,KAAM,CACLR,KAAMC,M,EAEPQ,MAAO,CACNT,KAAMC,M,EAEPS,QAAS,CACRV,KAAMC,M,GAQR,SAASU,uBACR,IACOC,EADHjB,uBAAAkB,iBAAmBlB,uBAAAkB,gBAAgBC,UAAS,GAAMjB,gBAAAkB,mBAC/CH,EAAQ,IAAIf,gBAAAkB,kBAAkC,CACnDC,eAAgB,cAChBlB,OAAQA,OACRmB,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,WAAab,EAAMc,iBAGnBC,WAAW,WACVhB,qBAAoB,CACrB,EAAG,CAAC,CAEN,CAxBWa,QAAAC,WAAqD,KAEhEd,qBAAoB","file":"user-guide.collection.js","sourcesContent":["import { ResolveIOServer } from '../resolveio-server-app';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { UserGuideModel } from '../models/user-guide.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\tlink: {\n\t\ttype: String\n\t},\n\tlabel: {\n\t\ttype: String\n\t},\n\tmessage: {\n\t\ttype: String\n\t},\n};\n\nexport let UserGuides: MongoManagerCollection<UserGuideModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = new MongoManagerModel<UserGuideModel>({\n\t\t\tcollectionName: 'user-guides',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tUserGuides = model.collection_main;\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/user-guide.collection.ts"],"names":["mongo_manager_1","require","resolveio_server_app_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","link","label","message","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","create","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","UserGuides","collection_main","setImmediate"],"mappings":"8FAAC,IAAAA,gBAAAC,QAAA,2BAAA,EAEDC,uBAAAD,QAAA,yBAAA,EAEIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,KAAM,CACLR,KAAMC,M,EAEPQ,MAAO,CACNT,KAAMC,M,EAEPS,QAAS,CACRV,KAAMC,M,GAQR,SAASU,uBACR,IACOC,EADHf,uBAAAgB,iBAAmBhB,uBAAAgB,gBAAgBC,UAAS,GAAMnB,gBAAAoB,mBAC/CH,EAAQjB,gBAAAoB,kBAAkBC,OAAuB,CACtDC,eAAgB,cAChBnB,OAAQA,OACRoB,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,WAAad,EAAMe,iBAGnBC,aAAa,WACZjB,qBAAoB,CACrB,CAAC,CAEH,CAxBWc,QAAAC,WAAqD,KAEhEf,qBAAoB","file":"user-guide.collection.js","sourcesContent":[" import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { UserGuideModel } from '../models/user-guide.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\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\tlink: {\n\t\ttype: String\n\t},\n\tlabel: {\n\t\ttype: String\n\t},\n\tmessage: {\n\t\ttype: String\n\t},\n};\n\nexport let UserGuides: MongoManagerCollection<UserGuideModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<UserGuideModel>({\n\t\t\tcollectionName: 'user-guides',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tUserGuides = model.collection_main;\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserVersions=exports.Users=void 0;var resolveio_server_app_1=require("../resolveio-server-app"),mongo_manager_1=require("../managers/mongo.manager"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},roles:{type:Object},"roles.super_admin":{type:Boolean},"roles.approvals":{type:Array},"roles.approvals.$":{type:Object},"roles.approvals.$.type":{type:String},"roles.approvals.$.key_1":{type:String,optional:!0},"roles.approvals.$.key_2":{type:String,optional:!0},"roles.approvals.$.key_3":{type:String,optional:!0},"roles.approvals.$.name":{type:String},"roles.groups":{type:Array},"roles.groups.$":{type:Object},"roles.groups.$.name":{type:String},"roles.groups.$.views":{type:Array},"roles.groups.$.views.$":{type:String},"roles.groups.$.yards":{type:Array,optional:!0},"roles.groups.$.yards.$":{type:String},"roles.notifications":{type:Array},"roles.notifications.$":{type:String},"roles.miscs":{type:Array},"roles.miscs.$":{type:String},username:{type:String,optional:!0},email:{type:String,optional:!0},fullname:{type:String},active:{type:Boolean},phonenumber:{type:String,optional:!0},readonly:{type:Boolean,optional:!0},other:{type:Object,blackbox:!0},settings:{type:Object,optional:!0},"settings.table_color":{type:String},"settings.table_font_color":{type:String},"settings.secondary_table_color":{type:String},"settings.secondary_table_font_color":{type:String},"settings.tertiary_table_color":{type:String},"settings.tertiary_table_font_color":{type:String},"settings.font_size":{type:Number},"settings.collapsable_menu":{type:Boolean},"settings.entries_per_page":{type:String},"settings.warning_color":{type:String},"settings.warning_font_color":{type:String},"settings.warning_hover_color":{type:String},"settings.success_color":{type:String},"settings.success_font_color":{type:String},"settings.success_hover_color":{type:String},"settings.danger_color":{type:String},"settings.danger_font_color":{type:String},"settings.danger_hover_color":{type:String},"settings.info_color":{type:String},"settings.info_font_color":{type:String},"settings.info_hover_color":{type:String},"settings.primary_color":{type:String},"settings.primary_font_color":{type:String},"settings.primary_hover_color":{type:String},"settings.secondary_color":{type:String},"settings.secondary_font_color":{type:String},"settings.secondary_hover_color":{type:String},"settings.routing_preference":{type:String},"settings.opening_route":{type:String},salt:{type:String},hash:{type:String},attempts:{type:Number},last:{type:Date,optional:!0},services:{type:Object,optional:!0},"services.enrollment":{type:String,optional:!0},"services.forgot_password":{type:String,optional:!0},"services.reset_password":{type:String,optional:!0},is_customer:{type:Boolean,optional:!0}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=new mongo_manager_1.MongoManagerModel({collectionName:"users",schema:schema,useVersionCollection:!0,useReportBuilder:!0,reportBuilderLookupTables:[],timestamps:!0,createLogs:!0,checkSchema:!0,collectionOptions:null}),exports.Users=e.collection_main,exports.Users.createIndex({fullname:1}),exports.Users.createIndex({active:1}),exports.UserVersions=e.collection_version):setTimeout(function(){initializeCollection()},1)}exports.Users=null,exports.UserVersions=null,initializeCollection();
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UserVersions=exports.Users=void 0;var mongo_manager_1=require("../managers/mongo.manager"),resolveio_server_app_1=require("../resolveio-server-app"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},roles:{type:Object},"roles.super_admin":{type:Boolean},"roles.approvals":{type:Array},"roles.approvals.$":{type:Object},"roles.approvals.$.type":{type:String},"roles.approvals.$.key_1":{type:String,optional:!0},"roles.approvals.$.key_2":{type:String,optional:!0},"roles.approvals.$.key_3":{type:String,optional:!0},"roles.approvals.$.name":{type:String},"roles.groups":{type:Array},"roles.groups.$":{type:Object},"roles.groups.$.name":{type:String},"roles.groups.$.views":{type:Array},"roles.groups.$.views.$":{type:String},"roles.groups.$.yards":{type:Array,optional:!0},"roles.groups.$.yards.$":{type:String},"roles.notifications":{type:Array},"roles.notifications.$":{type:String},"roles.miscs":{type:Array},"roles.miscs.$":{type:String},username:{type:String,optional:!0},email:{type:String,optional:!0},fullname:{type:String},active:{type:Boolean},phonenumber:{type:String,optional:!0},readonly:{type:Boolean,optional:!0},other:{type:Object,blackbox:!0},settings:{type:Object,optional:!0},"settings.table_color":{type:String},"settings.table_font_color":{type:String},"settings.secondary_table_color":{type:String},"settings.secondary_table_font_color":{type:String},"settings.tertiary_table_color":{type:String},"settings.tertiary_table_font_color":{type:String},"settings.font_size":{type:Number},"settings.collapsable_menu":{type:Boolean},"settings.entries_per_page":{type:String},"settings.warning_color":{type:String},"settings.warning_font_color":{type:String},"settings.warning_hover_color":{type:String},"settings.success_color":{type:String},"settings.success_font_color":{type:String},"settings.success_hover_color":{type:String},"settings.danger_color":{type:String},"settings.danger_font_color":{type:String},"settings.danger_hover_color":{type:String},"settings.info_color":{type:String},"settings.info_font_color":{type:String},"settings.info_hover_color":{type:String},"settings.primary_color":{type:String},"settings.primary_font_color":{type:String},"settings.primary_hover_color":{type:String},"settings.secondary_color":{type:String},"settings.secondary_font_color":{type:String},"settings.secondary_hover_color":{type:String},"settings.routing_preference":{type:String},"settings.opening_route":{type:String},salt:{type:String},hash:{type:String},attempts:{type:Number},last:{type:Date,optional:!0},services:{type:Object,optional:!0},"services.enrollment":{type:String,optional:!0},"services.forgot_password":{type:String,optional:!0},"services.reset_password":{type:String,optional:!0},is_customer:{type:Boolean,optional:!0}};function initializeCollection(){var e;resolveio_server_app_1.ResolveIOServer&&resolveio_server_app_1.ResolveIOServer.getMainDB()&&mongo_manager_1.MongoManagerModel?(e=mongo_manager_1.MongoManagerModel.create({collectionName:"users",schema:schema,useVersionCollection:!0,useReportBuilder:!0,reportBuilderLookupTables:[],timestamps:!0,createLogs:!0,checkSchema:!0,collectionOptions:null}),exports.Users=e.collection_main,exports.Users.createIndex({fullname:1}),exports.Users.createIndex({active:1}),exports.UserVersions=e.collection_version):setImmediate(function(){initializeCollection()})}exports.Users=null,exports.UserVersions=null,initializeCollection();
2
2
  //# sourceMappingURL=user.collection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/user.collection.ts"],"names":["resolveio_server_app_1","require","mongo_manager_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","roles","Object","roles.super_admin","Boolean","roles.approvals","Array","roles.approvals.$","roles.approvals.$.type","roles.approvals.$.key_1","roles.approvals.$.key_2","roles.approvals.$.key_3","roles.approvals.$.name","roles.groups","roles.groups.$","roles.groups.$.name","roles.groups.$.views","roles.groups.$.views.$","roles.groups.$.yards","roles.groups.$.yards.$","roles.notifications","roles.notifications.$","roles.miscs","roles.miscs.$","username","email","fullname","active","phonenumber","readonly","other","blackbox","settings","settings.table_color","settings.table_font_color","settings.secondary_table_color","settings.secondary_table_font_color","settings.tertiary_table_color","settings.tertiary_table_font_color","settings.font_size","settings.collapsable_menu","settings.entries_per_page","settings.warning_color","settings.warning_font_color","settings.warning_hover_color","settings.success_color","settings.success_font_color","settings.success_hover_color","settings.danger_color","settings.danger_font_color","settings.danger_hover_color","settings.info_color","settings.info_font_color","settings.info_hover_color","settings.primary_color","settings.primary_font_color","settings.primary_hover_color","settings.secondary_color","settings.secondary_font_color","settings.secondary_hover_color","settings.routing_preference","settings.opening_route","salt","hash","attempts","last","services","services.enrollment","services.forgot_password","services.reset_password","is_customer","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","Users","collection_main","createIndex","UserVersions","collection_version","setTimeout"],"mappings":"8GAAA,IAAAA,uBAAAC,QAAA,yBAAA,EACAC,gBAAAD,QAAA,2BAAA,EAGIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,MAAO,CACNR,KAAMS,M,EAEPC,oBAAqB,CACpBV,KAAMW,O,EAEPC,kBAAmB,CAClBZ,KAAMa,K,EAEPC,oBAAqB,CACpBd,KAAMS,M,EAEPM,yBAA0B,CACzBf,KAAMC,M,EAEPe,0BAA2B,CAC1BhB,KAAMC,OACNC,SAAU,CAAA,C,EAEXe,0BAA2B,CAC1BjB,KAAMC,OACNC,SAAU,CAAA,C,EAEXgB,0BAA2B,CAC1BlB,KAAMC,OACNC,SAAU,CAAA,C,EAEXiB,yBAA0B,CACzBnB,KAAMC,M,EAEPmB,eAAgB,CACfpB,KAAMa,K,EAEPQ,iBAAkB,CACjBrB,KAAMS,M,EAEPa,sBAAuB,CACtBtB,KAAMC,M,EAEPsB,uBAAwB,CACvBvB,KAAMa,K,EAEPW,yBAA0B,CACzBxB,KAAMC,M,EAEPwB,uBAAwB,CACvBzB,KAAMa,MACNX,SAAU,CAAA,C,EAEXwB,yBAA0B,CACzB1B,KAAMC,M,EAEP0B,sBAAuB,CACtB3B,KAAMa,K,EAEPe,wBAAyB,CACxB5B,KAAMC,M,EAEP4B,cAAe,CACd7B,KAAMa,K,EAEPiB,gBAAiB,CAChB9B,KAAMC,M,EAEP8B,SAAU,CACT/B,KAAMC,OACNC,SAAU,CAAA,C,EAEX8B,MAAO,CACNhC,KAAMC,OACNC,SAAU,CAAA,C,EAEX+B,SAAU,CACTjC,KAAMC,M,EAEPiC,OAAQ,CACPlC,KAAMW,O,EAEPwB,YAAa,CACZnC,KAAMC,OACNC,SAAU,CAAA,C,EAEXkC,SAAU,CACTpC,KAAMW,QACNT,SAAU,CAAA,C,EAEXmC,MAAO,CACNrC,KAAMS,OACN6B,SAAU,CAAA,C,EAEXC,SAAU,CACTvC,KAAMS,OACNP,SAAU,CAAA,C,EAEXsC,uBAAwB,CACvBxC,KAAMC,M,EAEPwC,4BAA6B,CAC5BzC,KAAMC,M,EAEPyC,iCAAkC,CACjC1C,KAAMC,M,EAEP0C,sCAAuC,CACtC3C,KAAMC,M,EAEP2C,gCAAiC,CAChC5C,KAAMC,M,EAEP4C,qCAAsC,CACrC7C,KAAMC,M,EAEP6C,qBAAsB,CACrB9C,KAAMI,M,EAEP2C,4BAA6B,CAC5B/C,KAAMW,O,EAEPqC,4BAA6B,CAC5BhD,KAAMC,M,EAEPgD,yBAA0B,CACzBjD,KAAMC,M,EAEPiD,8BAA+B,CAC9BlD,KAAMC,M,EAEPkD,+BAAgC,CAC/BnD,KAAMC,M,EAEPmD,yBAA0B,CACzBpD,KAAMC,M,EAEPoD,8BAA+B,CAC9BrD,KAAMC,M,EAEPqD,+BAAgC,CAC/BtD,KAAMC,M,EAEPsD,wBAAyB,CACxBvD,KAAMC,M,EAEPuD,6BAA8B,CAC7BxD,KAAMC,M,EAEPwD,8BAA+B,CAC9BzD,KAAMC,M,EAEPyD,sBAAuB,CACtB1D,KAAMC,M,EAEP0D,2BAA4B,CAC3B3D,KAAMC,M,EAEP2D,4BAA6B,CAC5B5D,KAAMC,M,EAEP4D,yBAA0B,CACzB7D,KAAMC,M,EAEP6D,8BAA+B,CAC9B9D,KAAMC,M,EAEP8D,+BAAgC,CAC/B/D,KAAMC,M,EAEP+D,2BAA4B,CAC3BhE,KAAMC,M,EAEPgE,gCAAiC,CAChCjE,KAAMC,M,EAEPiE,iCAAkC,CACjClE,KAAMC,M,EAEPkE,8BAA+B,CAC9BnE,KAAMC,M,EAEPmE,yBAA0B,CACzBpE,KAAMC,M,EAEPoE,KAAM,CACLrE,KAAMC,M,EAEPqE,KAAM,CACLtE,KAAMC,M,EAEPsE,SAAU,CACTvE,KAAMI,M,EAEPoE,KAAM,CACLxE,KAAMM,KACNJ,SAAU,CAAA,C,EAEXuE,SAAU,CACTzE,KAAMS,OACNP,SAAU,CAAA,C,EAEXwE,sBAAuB,CACtB1E,KAAMC,OACNC,SAAU,CAAA,C,EAEXyE,2BAA4B,CAC3B3E,KAAMC,OACNC,SAAU,CAAA,C,EAEX0E,0BAA2B,CAC1B5E,KAAMC,OACNC,SAAU,CAAA,C,EAEX2E,YAAa,CACZ7E,KAAMW,QACNT,SAAU,CAAA,C,GASZ,SAAS4E,uBACR,IACOC,EADHpF,uBAAAqF,iBAAmBrF,uBAAAqF,gBAAgBC,UAAS,GAAMpF,gBAAAqF,mBAC/CH,EAAQ,IAAIlF,gBAAAqF,kBAA6B,CAC9CC,eAAgB,QAChBrF,OAAQA,OACRsF,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,MAA+Cb,EAAMc,gBACrDF,QAAAC,MAAME,YAAY,CAAC7D,SAAU,CAAC,CAAC,EAC/B0D,QAAAC,MAAME,YAAY,CAAC5D,OAAQ,CAAC,CAAC,EAC7ByD,QAAAI,aAAsDhB,EAAMiB,oBAG5DC,WAAW,WACVnB,qBAAoB,CACrB,EAAG,CAAC,CAEN,CA5BWa,QAAAC,MAA+C,KAC/CD,QAAAI,aAAsD,KAEjEjB,qBAAoB","file":"user.collection.js","sourcesContent":["import { ResolveIOServer } from '../resolveio-server-app';\nimport { MongoManagerModel, MongoManagerUserCollection } from '../managers/mongo.manager';\nimport { UserModel } from '../models/user.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\troles: {\n\t\ttype: Object\n\t},\n\t'roles.super_admin': {\n\t\ttype: Boolean\n\t},\n\t'roles.approvals': {\n\t\ttype: Array\n\t},\n\t'roles.approvals.$': {\n\t\ttype: Object\n\t},\n\t'roles.approvals.$.type': {\n\t\ttype: String\n\t},\n\t'roles.approvals.$.key_1': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'roles.approvals.$.key_2': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'roles.approvals.$.key_3': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'roles.approvals.$.name': {\n\t\ttype: String\n\t},\n\t'roles.groups': {\n\t\ttype: Array\n\t},\n\t'roles.groups.$': {\n\t\ttype: Object\n\t},\n\t'roles.groups.$.name': {\n\t\ttype: String\n\t},\n\t'roles.groups.$.views': {\n\t\ttype: Array\n\t},\n\t'roles.groups.$.views.$': {\n\t\ttype: String\n\t},\n\t'roles.groups.$.yards': {\n\t\ttype: Array,\n\t\toptional: true\n\t},\n\t'roles.groups.$.yards.$': {\n\t\ttype: String\n\t},\n\t'roles.notifications': {\n\t\ttype: Array\n\t},\n\t'roles.notifications.$': {\n\t\ttype: String\n\t},\n\t'roles.miscs': {\n\t\ttype: Array\n\t},\n\t'roles.miscs.$': {\n\t\ttype: String\n\t},\n\tusername: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\temail: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tfullname: {\n\t\ttype: String\n\t},\n\tactive: {\n\t\ttype: Boolean\n\t},\n\tphonenumber: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\treadonly: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t},\n\tother: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tsettings: {\n\t\ttype: Object,\n\t\toptional: true\n\t},\n\t'settings.table_color': {\n\t\ttype: String\n\t},\n\t'settings.table_font_color': {\n\t\ttype: String\n\t},\n\t'settings.secondary_table_color': {\n\t\ttype: String\n\t},\n\t'settings.secondary_table_font_color': {\n\t\ttype: String\n\t},\n\t'settings.tertiary_table_color': {\n\t\ttype: String\n\t},\n\t'settings.tertiary_table_font_color': {\n\t\ttype: String\n\t},\n\t'settings.font_size': {\n\t\ttype: Number\n\t},\n\t'settings.collapsable_menu': {\n\t\ttype: Boolean\n\t},\n\t'settings.entries_per_page': {\n\t\ttype: String\n\t},\n\t'settings.warning_color': {\n\t\ttype: String\n\t},\n\t'settings.warning_font_color': {\n\t\ttype: String\n\t},\n\t'settings.warning_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.success_color': {\n\t\ttype: String\n\t},\n\t'settings.success_font_color': {\n\t\ttype: String\n\t},\n\t'settings.success_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.danger_color': {\n\t\ttype: String\n\t},\n\t'settings.danger_font_color': {\n\t\ttype: String\n\t},\n\t'settings.danger_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.info_color': {\n\t\ttype: String\n\t},\n\t'settings.info_font_color': {\n\t\ttype: String\n\t},\n\t'settings.info_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.primary_color': {\n\t\ttype: String\n\t},\n\t'settings.primary_font_color': {\n\t\ttype: String\n\t},\n\t'settings.primary_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.secondary_color': {\n\t\ttype: String\n\t},\n\t'settings.secondary_font_color': {\n\t\ttype: String\n\t},\n\t'settings.secondary_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.routing_preference': {\n\t\ttype: String\n\t},\n\t'settings.opening_route': {\n\t\ttype: String\n\t},\n\tsalt: {\n\t\ttype: String\n\t},\n\thash: {\n\t\ttype: String\n\t},\n\tattempts: {\n\t\ttype: Number\n\t},\n\tlast: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tservices: {\n\t\ttype: Object,\n\t\toptional: true\n\t},\n\t'services.enrollment': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'services.forgot_password': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'services.reset_password': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tis_customer: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t}\n};\n\nexport let Users: MongoManagerUserCollection<UserModel> = null;\nexport let UserVersions: MongoManagerUserCollection<UserModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = new MongoManagerModel<UserModel>({\n\t\t\tcollectionName: 'users',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: true,\n\t\t\tuseReportBuilder: true,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: true,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tUsers = <MongoManagerUserCollection<UserModel>>model.collection_main;\n\t\tUsers.createIndex({fullname: 1});\n\t\tUsers.createIndex({active: 1});\n\t\tUserVersions = <MongoManagerUserCollection<UserModel>>model.collection_version;\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/collections/user.collection.ts"],"names":["mongo_manager_1","require","resolveio_server_app_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","roles","Object","roles.super_admin","Boolean","roles.approvals","Array","roles.approvals.$","roles.approvals.$.type","roles.approvals.$.key_1","roles.approvals.$.key_2","roles.approvals.$.key_3","roles.approvals.$.name","roles.groups","roles.groups.$","roles.groups.$.name","roles.groups.$.views","roles.groups.$.views.$","roles.groups.$.yards","roles.groups.$.yards.$","roles.notifications","roles.notifications.$","roles.miscs","roles.miscs.$","username","email","fullname","active","phonenumber","readonly","other","blackbox","settings","settings.table_color","settings.table_font_color","settings.secondary_table_color","settings.secondary_table_font_color","settings.tertiary_table_color","settings.tertiary_table_font_color","settings.font_size","settings.collapsable_menu","settings.entries_per_page","settings.warning_color","settings.warning_font_color","settings.warning_hover_color","settings.success_color","settings.success_font_color","settings.success_hover_color","settings.danger_color","settings.danger_font_color","settings.danger_hover_color","settings.info_color","settings.info_font_color","settings.info_hover_color","settings.primary_color","settings.primary_font_color","settings.primary_hover_color","settings.secondary_color","settings.secondary_font_color","settings.secondary_hover_color","settings.routing_preference","settings.opening_route","salt","hash","attempts","last","services","services.enrollment","services.forgot_password","services.reset_password","is_customer","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","create","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","Users","collection_main","createIndex","UserVersions","collection_version","setImmediate"],"mappings":"8GACA,IAAAA,gBAAAC,QAAA,2BAAA,EAEAC,uBAAAD,QAAA,yBAAA,EAEIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,MAAO,CACNR,KAAMS,M,EAEPC,oBAAqB,CACpBV,KAAMW,O,EAEPC,kBAAmB,CAClBZ,KAAMa,K,EAEPC,oBAAqB,CACpBd,KAAMS,M,EAEPM,yBAA0B,CACzBf,KAAMC,M,EAEPe,0BAA2B,CAC1BhB,KAAMC,OACNC,SAAU,CAAA,C,EAEXe,0BAA2B,CAC1BjB,KAAMC,OACNC,SAAU,CAAA,C,EAEXgB,0BAA2B,CAC1BlB,KAAMC,OACNC,SAAU,CAAA,C,EAEXiB,yBAA0B,CACzBnB,KAAMC,M,EAEPmB,eAAgB,CACfpB,KAAMa,K,EAEPQ,iBAAkB,CACjBrB,KAAMS,M,EAEPa,sBAAuB,CACtBtB,KAAMC,M,EAEPsB,uBAAwB,CACvBvB,KAAMa,K,EAEPW,yBAA0B,CACzBxB,KAAMC,M,EAEPwB,uBAAwB,CACvBzB,KAAMa,MACNX,SAAU,CAAA,C,EAEXwB,yBAA0B,CACzB1B,KAAMC,M,EAEP0B,sBAAuB,CACtB3B,KAAMa,K,EAEPe,wBAAyB,CACxB5B,KAAMC,M,EAEP4B,cAAe,CACd7B,KAAMa,K,EAEPiB,gBAAiB,CAChB9B,KAAMC,M,EAEP8B,SAAU,CACT/B,KAAMC,OACNC,SAAU,CAAA,C,EAEX8B,MAAO,CACNhC,KAAMC,OACNC,SAAU,CAAA,C,EAEX+B,SAAU,CACTjC,KAAMC,M,EAEPiC,OAAQ,CACPlC,KAAMW,O,EAEPwB,YAAa,CACZnC,KAAMC,OACNC,SAAU,CAAA,C,EAEXkC,SAAU,CACTpC,KAAMW,QACNT,SAAU,CAAA,C,EAEXmC,MAAO,CACNrC,KAAMS,OACN6B,SAAU,CAAA,C,EAEXC,SAAU,CACTvC,KAAMS,OACNP,SAAU,CAAA,C,EAEXsC,uBAAwB,CACvBxC,KAAMC,M,EAEPwC,4BAA6B,CAC5BzC,KAAMC,M,EAEPyC,iCAAkC,CACjC1C,KAAMC,M,EAEP0C,sCAAuC,CACtC3C,KAAMC,M,EAEP2C,gCAAiC,CAChC5C,KAAMC,M,EAEP4C,qCAAsC,CACrC7C,KAAMC,M,EAEP6C,qBAAsB,CACrB9C,KAAMI,M,EAEP2C,4BAA6B,CAC5B/C,KAAMW,O,EAEPqC,4BAA6B,CAC5BhD,KAAMC,M,EAEPgD,yBAA0B,CACzBjD,KAAMC,M,EAEPiD,8BAA+B,CAC9BlD,KAAMC,M,EAEPkD,+BAAgC,CAC/BnD,KAAMC,M,EAEPmD,yBAA0B,CACzBpD,KAAMC,M,EAEPoD,8BAA+B,CAC9BrD,KAAMC,M,EAEPqD,+BAAgC,CAC/BtD,KAAMC,M,EAEPsD,wBAAyB,CACxBvD,KAAMC,M,EAEPuD,6BAA8B,CAC7BxD,KAAMC,M,EAEPwD,8BAA+B,CAC9BzD,KAAMC,M,EAEPyD,sBAAuB,CACtB1D,KAAMC,M,EAEP0D,2BAA4B,CAC3B3D,KAAMC,M,EAEP2D,4BAA6B,CAC5B5D,KAAMC,M,EAEP4D,yBAA0B,CACzB7D,KAAMC,M,EAEP6D,8BAA+B,CAC9B9D,KAAMC,M,EAEP8D,+BAAgC,CAC/B/D,KAAMC,M,EAEP+D,2BAA4B,CAC3BhE,KAAMC,M,EAEPgE,gCAAiC,CAChCjE,KAAMC,M,EAEPiE,iCAAkC,CACjClE,KAAMC,M,EAEPkE,8BAA+B,CAC9BnE,KAAMC,M,EAEPmE,yBAA0B,CACzBpE,KAAMC,M,EAEPoE,KAAM,CACLrE,KAAMC,M,EAEPqE,KAAM,CACLtE,KAAMC,M,EAEPsE,SAAU,CACTvE,KAAMI,M,EAEPoE,KAAM,CACLxE,KAAMM,KACNJ,SAAU,CAAA,C,EAEXuE,SAAU,CACTzE,KAAMS,OACNP,SAAU,CAAA,C,EAEXwE,sBAAuB,CACtB1E,KAAMC,OACNC,SAAU,CAAA,C,EAEXyE,2BAA4B,CAC3B3E,KAAMC,OACNC,SAAU,CAAA,C,EAEX0E,0BAA2B,CAC1B5E,KAAMC,OACNC,SAAU,CAAA,C,EAEX2E,YAAa,CACZ7E,KAAMW,QACNT,SAAU,CAAA,C,GASZ,SAAS4E,uBACR,IACOC,EADHlF,uBAAAmF,iBAAmBnF,uBAAAmF,gBAAgBC,UAAS,GAAMtF,gBAAAuF,mBAC/CH,EAAQpF,gBAAAuF,kBAAkBC,OAAkB,CACjDC,eAAgB,QAChBtF,OAAQA,OACRuF,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,MAA+Cd,EAAMe,gBACrDF,QAAAC,MAAME,YAAY,CAAC9D,SAAU,CAAC,CAAC,EAC/B2D,QAAAC,MAAME,YAAY,CAAC7D,OAAQ,CAAC,CAAC,EAC7B0D,QAAAI,aAAsDjB,EAAMkB,oBAG5DC,aAAa,WACZpB,qBAAoB,CACrB,CAAC,CAEH,CA5BWc,QAAAC,MAA+C,KAC/CD,QAAAI,aAAsD,KAEjElB,qBAAoB","file":"user.collection.js","sourcesContent":["/* eslint-disable @typescript-eslint/no-floating-promises */\nimport { MongoManagerModel, MongoManagerUserCollection } from '../managers/mongo.manager';\nimport { UserModel } from '../models/user.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\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\troles: {\n\t\ttype: Object\n\t},\n\t'roles.super_admin': {\n\t\ttype: Boolean\n\t},\n\t'roles.approvals': {\n\t\ttype: Array\n\t},\n\t'roles.approvals.$': {\n\t\ttype: Object\n\t},\n\t'roles.approvals.$.type': {\n\t\ttype: String\n\t},\n\t'roles.approvals.$.key_1': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'roles.approvals.$.key_2': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'roles.approvals.$.key_3': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'roles.approvals.$.name': {\n\t\ttype: String\n\t},\n\t'roles.groups': {\n\t\ttype: Array\n\t},\n\t'roles.groups.$': {\n\t\ttype: Object\n\t},\n\t'roles.groups.$.name': {\n\t\ttype: String\n\t},\n\t'roles.groups.$.views': {\n\t\ttype: Array\n\t},\n\t'roles.groups.$.views.$': {\n\t\ttype: String\n\t},\n\t'roles.groups.$.yards': {\n\t\ttype: Array,\n\t\toptional: true\n\t},\n\t'roles.groups.$.yards.$': {\n\t\ttype: String\n\t},\n\t'roles.notifications': {\n\t\ttype: Array\n\t},\n\t'roles.notifications.$': {\n\t\ttype: String\n\t},\n\t'roles.miscs': {\n\t\ttype: Array\n\t},\n\t'roles.miscs.$': {\n\t\ttype: String\n\t},\n\tusername: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\temail: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tfullname: {\n\t\ttype: String\n\t},\n\tactive: {\n\t\ttype: Boolean\n\t},\n\tphonenumber: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\treadonly: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t},\n\tother: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tsettings: {\n\t\ttype: Object,\n\t\toptional: true\n\t},\n\t'settings.table_color': {\n\t\ttype: String\n\t},\n\t'settings.table_font_color': {\n\t\ttype: String\n\t},\n\t'settings.secondary_table_color': {\n\t\ttype: String\n\t},\n\t'settings.secondary_table_font_color': {\n\t\ttype: String\n\t},\n\t'settings.tertiary_table_color': {\n\t\ttype: String\n\t},\n\t'settings.tertiary_table_font_color': {\n\t\ttype: String\n\t},\n\t'settings.font_size': {\n\t\ttype: Number\n\t},\n\t'settings.collapsable_menu': {\n\t\ttype: Boolean\n\t},\n\t'settings.entries_per_page': {\n\t\ttype: String\n\t},\n\t'settings.warning_color': {\n\t\ttype: String\n\t},\n\t'settings.warning_font_color': {\n\t\ttype: String\n\t},\n\t'settings.warning_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.success_color': {\n\t\ttype: String\n\t},\n\t'settings.success_font_color': {\n\t\ttype: String\n\t},\n\t'settings.success_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.danger_color': {\n\t\ttype: String\n\t},\n\t'settings.danger_font_color': {\n\t\ttype: String\n\t},\n\t'settings.danger_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.info_color': {\n\t\ttype: String\n\t},\n\t'settings.info_font_color': {\n\t\ttype: String\n\t},\n\t'settings.info_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.primary_color': {\n\t\ttype: String\n\t},\n\t'settings.primary_font_color': {\n\t\ttype: String\n\t},\n\t'settings.primary_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.secondary_color': {\n\t\ttype: String\n\t},\n\t'settings.secondary_font_color': {\n\t\ttype: String\n\t},\n\t'settings.secondary_hover_color': {\n\t\ttype: String\n\t},\n\t'settings.routing_preference': {\n\t\ttype: String\n\t},\n\t'settings.opening_route': {\n\t\ttype: String\n\t},\n\tsalt: {\n\t\ttype: String\n\t},\n\thash: {\n\t\ttype: String\n\t},\n\tattempts: {\n\t\ttype: Number\n\t},\n\tlast: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tservices: {\n\t\ttype: Object,\n\t\toptional: true\n\t},\n\t'services.enrollment': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'services.forgot_password': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'services.reset_password': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tis_customer: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t}\n};\n\nexport let Users: MongoManagerUserCollection<UserModel> = null;\nexport let UserVersions: MongoManagerUserCollection<UserModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<UserModel>({\n\t\t\tcollectionName: 'users',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: true,\n\t\t\tuseReportBuilder: true,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: true,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tUsers = <MongoManagerUserCollection<UserModel>>model.collection_main;\n\t\tUsers.createIndex({fullname: 1});\n\t\tUsers.createIndex({active: 1});\n\t\tUserVersions = <MongoManagerUserCollection<UserModel>>model.collection_version;\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
@@ -1,2 +1,2 @@
1
- "use strict";var __awaiter=this&&this.__awaiter||function(e,r,t,c){return new(t=t||Promise)(function(o,n){function fulfilled(e){try{step(c.next(e))}catch(e){n(e)}}function rejected(e){try{step(c.throw(e))}catch(e){n(e)}}function step(e){var n;e.done?o(e.value):((n=e.value)instanceof t?n:new t(function(e){e(n)})).then(fulfilled,rejected)}step((c=c.apply(e,r||[])).next())})},__generator=this&&this.__generator||function(r,t){var c,i,a,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u={next:verb(0),throw:verb(1),return:verb(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function verb(o){return function(e){var n=[o,e];if(c)throw new TypeError("Generator is already executing.");for(;l=u&&n[u=0]?0:l;)try{if(c=1,i&&(a=2&n[0]?i.return:n[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,n[1])).done)return a;switch(i=0,(n=a?[2&n[0],a.value]:n)[0]){case 0:case 1:a=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,i=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(!(a=0<(a=l.trys).length&&a[a.length-1])&&(6===n[0]||2===n[0])){l=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3]))l.label=n[1];else if(6===n[0]&&l.label<a[1])l.label=a[1],a=n;else{if(!(a&&l.label<a[2])){a[2]&&l.ops.pop(),l.trys.pop();continue}l.label=a[2],l.ops.push(n)}}n=t.call(r,l)}catch(e){n=[6,e],i=0}finally{c=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}}},cron_job_collection_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadServerCronJobs=void 0,require("../collections/cron-job.collection")),common_1=require("../util/common");function loadServerCronJobs(){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(e){switch(e.label){case 0:return[4,cron_job_collection_1.CronJobs.find({})];case 1:return(n=e.sent()).some(function(e){return"Email Merged Docs Cleanup"===e.name})||cron_job_collection_1.CronJobs.create({_id:(0,common_1.objectIdHexString)(),__v:0,name:"Email Merged Docs Cleanup",repeat:!0,time_to_run:"0 0 * * *",method_run:"cronEmailMergedDocsCleanUp",method_run_data:null,next_run:new Date,running:!1,timezone:process.env.TZ_CLIENT||"America/Chicago"}),n.some(function(e){return"Stuck Cron Job"===e.name})||cron_job_collection_1.CronJobs.create({_id:(0,common_1.objectIdHexString)(),__v:0,name:"Stuck Cron Job",repeat:!0,time_to_run:"*/5 * * * *",method_run:"stuckCronJob",method_run_data:null,next_run:new Date,running:!1,timezone:process.env.TZ_CLIENT||"America/Chicago"}),n.some(function(e){return e.running})&&cron_job_collection_1.CronJobs.updateMany({running:!0},{$set:{running:!1}}),[2]}})})}exports.loadServerCronJobs=loadServerCronJobs;
1
+ "use strict";var __awaiter=this&&this.__awaiter||function(e,t,o,c){return new(o=o||Promise)(function(r,n){function fulfilled(e){try{step(c.next(e))}catch(e){n(e)}}function rejected(e){try{step(c.throw(e))}catch(e){n(e)}}function step(e){var n;e.done?r(e.value):((n=e.value)instanceof o?n:new o(function(e){e(n)})).then(fulfilled,rejected)}step((c=c.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(t,o){var c,a,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},u={next:verb(0),throw:verb(1),return:verb(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function verb(r){return function(e){var n=[r,e];if(c)throw new TypeError("Generator is already executing.");for(;l=u&&n[u=0]?0:l;)try{if(c=1,a&&(i=2&n[0]?a.return:n[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,n[1])).done)return i;switch(a=0,(n=i?[2&n[0],i.value]:n)[0]){case 0:case 1:i=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,a=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===n[0]||2===n[0])){l=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3]))l.label=n[1];else if(6===n[0]&&l.label<i[1])l.label=i[1],i=n;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(n)}}n=o.call(t,l)}catch(e){n=[6,e],a=0}finally{c=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}}},cron_job_collection_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadServerCronJobs=void 0,require("../collections/cron-job.collection")),common_1=require("../util/common");function loadServerCronJobs(){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(e){switch(e.label){case 0:return[4,cron_job_collection_1.CronJobs.find({})];case 1:return(n=e.sent()).some(function(e){return"Email Merged Docs Cleanup"===e.name})?[3,3]:[4,cron_job_collection_1.CronJobs.create({_id:(0,common_1.objectIdHexString)(),__v:0,name:"Email Merged Docs Cleanup",repeat:!0,time_to_run:"0 0 * * *",method_run:"cronEmailMergedDocsCleanUp",method_run_data:null,next_run:new Date,running:!1,timezone:process.env.TZ_CLIENT||"America/Chicago"})];case 2:e.sent(),e.label=3;case 3:return n.some(function(e){return"Stuck Cron Job"===e.name})?[3,5]:[4,cron_job_collection_1.CronJobs.create({_id:(0,common_1.objectIdHexString)(),__v:0,name:"Stuck Cron Job",repeat:!0,time_to_run:"*/5 * * * *",method_run:"stuckCronJob",method_run_data:null,next_run:new Date,running:!1,timezone:process.env.TZ_CLIENT||"America/Chicago"})];case 4:e.sent(),e.label=5;case 5:return n.some(function(e){return e.running})?[4,cron_job_collection_1.CronJobs.updateMany({running:!0},{$set:{running:!1}})]:[3,7];case 6:e.sent(),e.label=7;case 7:return[2]}})})}exports.loadServerCronJobs=loadServerCronJobs;
2
2
  //# sourceMappingURL=cron-jobs.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/fixtures/cron-jobs.ts"],"names":["cron_job_collection_1","require","common_1","loadServerCronJobs","CronJobs","find","cronJobs","_a","sent","some","a","name","create","_id","objectIdHexString","__v","repeat","time_to_run","method_run","method_run_data","next_run","Date","running","timezone","process","env","TZ_CLIENT","updateMany","$set","exports"],"mappings":"k8CAAAA,uB,yFAAAC,QAAA,oCAAA,GACAC,SAAAD,QAAA,gBAAA,EAEA,SAAsBE,qB,gHAEN,MAAA,CAAA,EAAMH,sBAAAI,SAASC,KAAK,EAAE,G,cAAjCC,EAAWC,EAAAC,KAAA,GAEDC,KAAK,SAAAC,GAAK,MAAW,8BAAXA,EAAEC,IAAF,CAAsC,GAC7DX,sBAAAI,SAASQ,OAAO,CACfC,KAAK,EAAAX,SAAAY,mBAAiB,EACtBC,IAAK,EACLJ,KAAO,4BACPK,OAAS,CAAA,EACTC,YAAc,YACdC,WAAa,6BACbC,gBAAkB,KAClBC,SAAW,IAAIC,KACfC,QAAU,CAAA,EACVC,SAAUC,QAAQC,IAAIC,WAAa,iB,CACnC,EAGGpB,EAASG,KAAK,SAAAC,GAAK,MAAW,mBAAXA,EAAEC,IAAF,CAA2B,GAClDX,sBAAAI,SAASQ,OAAO,CACfC,KAAK,EAAAX,SAAAY,mBAAiB,EACtBC,IAAK,EACLJ,KAAO,iBACPK,OAAS,CAAA,EACTC,YAAc,cACdC,WAAa,eACbC,gBAAkB,KAClBC,SAAW,IAAIC,KACfC,QAAU,CAAA,EACVC,SAAUC,QAAQC,IAAIC,WAAa,iB,CACnC,EAGEpB,EAASG,KAAK,SAAAC,GAAK,OAAAA,EAAEY,OAAF,CAAS,GAC/BtB,sBAAAI,SAASuB,WAAW,CAACL,QAAS,CAAA,CAAI,EAAG,CAACM,KAAM,CAACN,QAAS,CAAA,CAAK,CAAC,CAAC,E,SAnC/DO,QAAA1B,mBAAAA","file":"cron-jobs.js","sourcesContent":["import { CronJobs } from '../collections/cron-job.collection';\nimport { objectIdHexString } from '../util/common';\n\nexport async function loadServerCronJobs() {\n\n\tlet cronJobs = await CronJobs.find({});\n\n\tif (!cronJobs.some(a => a.name === 'Email Merged Docs Cleanup')) {\n\t\tCronJobs.create({\n\t\t\t_id: objectIdHexString(),\n\t\t\t__v: 0,\n\t\t\tname : 'Email Merged Docs Cleanup', \n\t\t\trepeat : true, \n\t\t\ttime_to_run : '0 0 * * *', \n\t\t\tmethod_run : 'cronEmailMergedDocsCleanUp', \n\t\t\tmethod_run_data : null, \n\t\t\tnext_run : new Date(), \n\t\t\trunning : false,\n\t\t\ttimezone: process.env.TZ_CLIENT || 'America/Chicago'\n\t\t});\n\t}\n\n\tif (!cronJobs.some(a => a.name === 'Stuck Cron Job')) {\n\t\tCronJobs.create({\n\t\t\t_id: objectIdHexString(),\n\t\t\t__v: 0,\n\t\t\tname : 'Stuck Cron Job', \n\t\t\trepeat : true, \n\t\t\ttime_to_run : '*/5 * * * *', \n\t\t\tmethod_run : 'stuckCronJob', \n\t\t\tmethod_run_data : null, \n\t\t\tnext_run : new Date(), \n\t\t\trunning : false,\n\t\t\ttimezone: process.env.TZ_CLIENT || 'America/Chicago'\n\t\t});\n\t}\n\n\tif (cronJobs.some(a => a.running)) {\n\t\tCronJobs.updateMany({running: true}, {$set: {running: false}});\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/fixtures/cron-jobs.ts"],"names":["cron_job_collection_1","require","common_1","loadServerCronJobs","CronJobs","find","cronJobs","_a","sent","some","a","name","create","_id","objectIdHexString","__v","repeat","time_to_run","method_run","method_run_data","next_run","Date","running","timezone","process","env","TZ_CLIENT","updateMany","$set","exports"],"mappings":"k8CAAAA,uB,yFAAAC,QAAA,oCAAA,GACAC,SAAAD,QAAA,gBAAA,EAEA,SAAsBE,qB,gHAEN,MAAA,CAAA,EAAMH,sBAAAI,SAASC,KAAK,EAAE,G,cAAjCC,EAAWC,EAAAC,KAAA,GAEDC,KAAK,SAAAC,GAAK,MAAW,8BAAXA,EAAEC,IAAF,CAAsC,EAA1D,CAAA,EAAA,GACH,CAAA,EAAMX,sBAAAI,SAASQ,OAAO,CACrBC,KAAK,EAAAX,SAAAY,mBAAiB,EACtBC,IAAK,EACLJ,KAAO,4BACPK,OAAS,CAAA,EACTC,YAAc,YACdC,WAAa,6BACbC,gBAAkB,KAClBC,SAAW,IAAIC,KACfC,QAAU,CAAA,EACVC,SAAUC,QAAQC,IAAIC,WAAa,iB,CACnC,G,OAXDnB,EAAAC,KAAA,E,wBAcIF,EAASG,KAAK,SAAAC,GAAK,MAAW,mBAAXA,EAAEC,IAAF,CAA2B,EAA/C,CAAA,EAAA,GACH,CAAA,EAAMX,sBAAAI,SAASQ,OAAO,CACrBC,KAAK,EAAAX,SAAAY,mBAAiB,EACtBC,IAAK,EACLJ,KAAO,iBACPK,OAAS,CAAA,EACTC,YAAc,cACdC,WAAa,eACbC,gBAAkB,KAClBC,SAAW,IAAIC,KACfC,QAAU,CAAA,EACVC,SAAUC,QAAQC,IAAIC,WAAa,iB,CACnC,G,OAXDnB,EAAAC,KAAA,E,wBAcGF,EAASG,KAAK,SAAAC,GAAK,OAAAA,EAAEY,OAAF,CAAS,EAC/B,CAAA,EAAMtB,sBAAAI,SAASuB,WAAW,CAACL,QAAS,CAAA,CAAI,EAAG,CAACM,KAAM,CAACN,QAAS,CAAA,CAAK,CAAC,CAAC,GADhE,CAAA,EAAA,G,OACHf,EAAAC,KAAA,E,gCAnCFqB,QAAA1B,mBAAAA","file":"cron-jobs.js","sourcesContent":["import { CronJobs } from '../collections/cron-job.collection';\nimport { objectIdHexString } from '../util/common';\n\nexport async function loadServerCronJobs() {\n\t\n\tlet cronJobs = await CronJobs.find({});\n\n\tif (!cronJobs.some(a => a.name === 'Email Merged Docs Cleanup')) {\n\t\tawait CronJobs.create({\n\t\t\t_id: objectIdHexString(),\n\t\t\t__v: 0,\n\t\t\tname : 'Email Merged Docs Cleanup', \n\t\t\trepeat : true, \n\t\t\ttime_to_run : '0 0 * * *', \n\t\t\tmethod_run : 'cronEmailMergedDocsCleanUp', \n\t\t\tmethod_run_data : null, \n\t\t\tnext_run : new Date(), \n\t\t\trunning : false,\n\t\t\ttimezone: process.env.TZ_CLIENT || 'America/Chicago'\n\t\t});\n\t}\n\n\tif (!cronJobs.some(a => a.name === 'Stuck Cron Job')) {\n\t\tawait CronJobs.create({\n\t\t\t_id: objectIdHexString(),\n\t\t\t__v: 0,\n\t\t\tname : 'Stuck Cron Job', \n\t\t\trepeat : true, \n\t\t\ttime_to_run : '*/5 * * * *', \n\t\t\tmethod_run : 'stuckCronJob', \n\t\t\tmethod_run_data : null, \n\t\t\tnext_run : new Date(), \n\t\t\trunning : false,\n\t\t\ttimezone: process.env.TZ_CLIENT || 'America/Chicago'\n\t\t});\n\t}\n\n\tif (cronJobs.some(a => a.running)) {\n\t\tawait CronJobs.updateMany({running: true}, {$set: {running: false}});\n\t}\n}"]}
package/fixtures/init.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var __awaiter=this&&this.__awaiter||function(e,n,l,o){return new(l=l||Promise)(function(r,t){function fulfilled(e){try{step(o.next(e))}catch(e){t(e)}}function rejected(e){try{step(o.throw(e))}catch(e){t(e)}}function step(e){var t;e.done?r(e.value):((t=e.value)instanceof l?t:new l(function(e){e(t)})).then(fulfilled,rejected)}step((o=o.apply(e,n||[])).next())})},__generator=this&&this.__generator||function(n,l){var o,i,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:verb(0),throw:verb(1),return:verb(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function verb(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(o=1,i&&(a=2&t[0]?i.return:t[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,t[1])).done)return a;switch(i=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,i=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))s.label=t[1];else if(6===t[0]&&s.label<a[1])s.label=a[1],a=t;else{if(!(a&&s.label<a[2])){a[2]&&s.ops.pop(),s.trys.pop();continue}s.label=a[2],s.ops.push(t)}}t=l.call(n,s)}catch(e){t=[6,e],i=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},flag_collection_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadServerInit=void 0,require("../collections/flag.collection")),email_history_collection_1=require("../collections/email-history.collection"),resolveio_server_app_1=require("../resolveio-server-app");function loadServerInit(){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(e){switch(e.label){case 0:return email_history_collection_1.EmailHistories.updateMany({status:"processing"},{$set:{status:"pending"}}),[4,flag_collection_1.Flags.findOne({type:"Enable Debug"})];case 1:return e.sent()||flag_collection_1.Flags.insertOne({type:"Enable Debug",value:!1}),[4,flag_collection_1.Flags.findOne({type:"Enable Debug PDF"})];case 2:return(t=e.sent())?t.value&&"http://localhost:4200"!==resolveio_server_app_1.ResolveIOServer.getServerConfig().ROOT_URL&&flag_collection_1.Flags.updateOne({_id:t._id},{$set:{value:!1}}):flag_collection_1.Flags.insertOne({type:"Enable Debug PDF",value:!1}),[2]}})})}exports.loadServerInit=loadServerInit;
1
+ "use strict";var __awaiter=this&&this.__awaiter||function(e,n,l,o){return new(l=l||Promise)(function(r,t){function fulfilled(e){try{step(o.next(e))}catch(e){t(e)}}function rejected(e){try{step(o.throw(e))}catch(e){t(e)}}function step(e){var t;e.done?r(e.value):((t=e.value)instanceof l?t:new l(function(e){e(t)})).then(fulfilled,rejected)}step((o=o.apply(e,n||[])).next())})},__generator=this&&this.__generator||function(n,l){var o,a,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},c={next:verb(0),throw:verb(1),return:verb(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function verb(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(o=1,a&&(i=2&t[0]?a.return:t[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,t[1])).done)return i;switch(a=0,(t=i?[2&t[0],i.value]:t)[0]){case 0:case 1:i=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,a=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(i=0<(i=s.trys).length&&i[i.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!i||t[1]>i[0]&&t[1]<i[3]))s.label=t[1];else if(6===t[0]&&s.label<i[1])s.label=i[1],i=t;else{if(!(i&&s.label<i[2])){i[2]&&s.ops.pop(),s.trys.pop();continue}s.label=i[2],s.ops.push(t)}}t=l.call(n,s)}catch(e){t=[6,e],a=0}finally{o=i=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},email_history_collection_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadServerInit=void 0,require("../collections/email-history.collection")),flag_collection_1=require("../collections/flag.collection"),resolveio_server_app_1=require("../resolveio-server-app");function loadServerInit(){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(e){switch(e.label){case 0:return[4,email_history_collection_1.EmailHistories.updateMany({status:"processing"},{$set:{status:"pending"}})];case 1:return e.sent(),[4,flag_collection_1.Flags.findOne({type:"Enable Debug"})];case 2:return e.sent()?[3,4]:[4,flag_collection_1.Flags.insertOne({type:"Enable Debug",value:!1})];case 3:e.sent(),e.label=4;case 4:return[4,flag_collection_1.Flags.findOne({type:"Enable Debug PDF"})];case 5:return(t=e.sent())?[3,7]:[4,flag_collection_1.Flags.insertOne({type:"Enable Debug PDF",value:!1})];case 6:return e.sent(),[3,9];case 7:return t.value&&"http://localhost:4200"!==resolveio_server_app_1.ResolveIOServer.getServerConfig().ROOT_URL?[4,flag_collection_1.Flags.updateOne({_id:t._id},{$set:{value:!1}})]:[3,9];case 8:e.sent(),e.label=9;case 9:return[2]}})})}exports.loadServerInit=loadServerInit;
2
2
  //# sourceMappingURL=init.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/fixtures/init.ts"],"names":["flag_collection_1","require","email_history_collection_1","resolveio_server_app_1","loadServerInit","EmailHistories","updateMany","status","$set","Flags","findOne","type","_a","sent","insertOne","value","enableDebugFlagPDF","ResolveIOServer","getServerConfig","updateOne","_id","exports"],"mappings":"k8CAAAA,mB,qFAAAC,QAAA,gCAAA,GACAC,2BAAAD,QAAA,yCAAA,EACAE,uBAAAF,QAAA,yBAAA,EAEA,SAAsBG,iB,gHAGC,OAFtBF,2BAAAG,eAAeC,WAAW,CAACC,OAAQ,YAAY,EAAG,CAACC,KAAM,CAACD,OAAQ,SAAS,CAAC,CAAC,EAEvD,CAAA,EAAMP,kBAAAS,MAAMC,QAAQ,CAACC,KAAM,cAAc,CAAC,G,OAMvC,OANHC,EAAAC,KAAA,GAGrBb,kBAAAS,MAAMK,UAAU,CAACH,KAAM,eAAgBI,MAAO,CAAA,CAAK,CAAC,EAG5B,CAAA,EAAMf,kBAAAS,MAAMC,QAAQ,CAACC,KAAM,kBAAkB,CAAC,G,cAAnEK,EAAqBJ,EAAAC,KAAA,GAKhBG,EAAmBD,OAA2D,0BAAlDZ,uBAAAc,gBAAgBC,gBAAe,EAAa,UAChFlB,kBAAAS,MAAMU,UAAU,CAACC,IAAKJ,EAAmBI,GAAG,EAAG,CAACZ,KAAM,CAACO,MAAO,CAAA,CAAK,CAAC,CAAC,EAHrEf,kBAAAS,MAAMK,UAAU,CAACH,KAAM,mBAAoBI,MAAO,CAAA,CAAK,CAAC,E,SAZ1DM,QAAAjB,eAAAA","file":"init.js","sourcesContent":["import { Flags } from '../collections/flag.collection';\nimport { EmailHistories } from '../collections/email-history.collection';\nimport { ResolveIOServer } from '../resolveio-server-app';\n\nexport async function loadServerInit() {\n\tEmailHistories.updateMany({status: 'processing'}, {$set: {status: 'pending'}});\n\n\tlet enableDebugFlag = await Flags.findOne({type: 'Enable Debug'});\n\n\tif (!enableDebugFlag) {\n\t\tFlags.insertOne({type: 'Enable Debug', value: false});\n\t}\n\n\tlet enableDebugFlagPDF = await Flags.findOne({type: 'Enable Debug PDF'});\n\n\tif (!enableDebugFlagPDF) {\n\t\tFlags.insertOne({type: 'Enable Debug PDF', value: false});\n\t}\n\telse if (enableDebugFlagPDF.value && ResolveIOServer.getServerConfig()['ROOT_URL'] !== 'http://localhost:4200') {\n\t\tFlags.updateOne({_id: enableDebugFlagPDF._id}, {$set: {value: false}});\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/fixtures/init.ts"],"names":["email_history_collection_1","require","flag_collection_1","resolveio_server_app_1","loadServerInit","EmailHistories","updateMany","status","$set","_a","sent","Flags","findOne","type","insertOne","value","enableDebugFlagPDF","ResolveIOServer","getServerConfig","updateOne","_id","exports"],"mappings":"k8CAAAA,4B,qFAAAC,QAAA,yCAAA,GACAC,kBAAAD,QAAA,gCAAA,EACAE,uBAAAF,QAAA,yBAAA,EAEA,SAAsBG,iB,gHACrB,MAAA,CAAA,EAAMJ,2BAAAK,eAAeC,WAAW,CAACC,OAAQ,YAAY,EAAG,CAACC,KAAM,CAACD,OAAQ,SAAS,CAAC,CAAC,G,OAE7D,OAFtBE,EAAAC,KAAA,EAEsB,CAAA,EAAMR,kBAAAS,MAAMC,QAAQ,CAACC,KAAM,cAAc,CAAC,G,cAA1CJ,EAAAC,KAAA,EAElB,CAAA,EAAA,GACH,CAAA,EAAMR,kBAAAS,MAAMG,UAAU,CAACD,KAAM,eAAgBE,MAAO,CAAA,CAAK,CAAC,G,OAA1DN,EAAAC,KAAA,E,iBAGwB,MAAA,CAAA,EAAMR,kBAAAS,MAAMC,QAAQ,CAACC,KAAM,kBAAkB,CAAC,G,cAAnEG,EAAqBP,EAAAC,KAAA,GAErB,CAAA,EAAA,GACH,CAAA,EAAMR,kBAAAS,MAAMG,UAAU,CAACD,KAAM,mBAAoBE,MAAO,CAAA,CAAK,CAAC,G,cAA9DN,EAAAC,KAAA,E,oBAEQM,EAAmBD,OAA2D,0BAAlDZ,uBAAAc,gBAAgBC,gBAAe,EAAa,SAChF,CAAA,EAAMhB,kBAAAS,MAAMQ,UAAU,CAACC,IAAKJ,EAAmBI,GAAG,EAAG,CAACZ,KAAM,CAACO,MAAO,CAAA,CAAK,CAAC,CAAC,GADnE,CAAA,EAAA,G,OACRN,EAAAC,KAAA,E,gCAfFW,QAAAjB,eAAAA","file":"init.js","sourcesContent":["import { EmailHistories } from '../collections/email-history.collection';\nimport { Flags } from '../collections/flag.collection';\nimport { ResolveIOServer } from '../resolveio-server-app';\n\nexport async function loadServerInit() {\n\tawait EmailHistories.updateMany({status: 'processing'}, {$set: {status: 'pending'}});\n\n\tlet enableDebugFlag = await Flags.findOne({type: 'Enable Debug'});\n\n\tif (!enableDebugFlag) {\n\t\tawait Flags.insertOne({type: 'Enable Debug', value: false});\n\t}\n\n\tlet enableDebugFlagPDF = await Flags.findOne({type: 'Enable Debug PDF'});\n\n\tif (!enableDebugFlagPDF) {\n\t\tawait Flags.insertOne({type: 'Enable Debug PDF', value: false});\n\t}\n\telse if (enableDebugFlagPDF.value && ResolveIOServer.getServerConfig()['ROOT_URL'] !== 'http://localhost:4200') {\n\t\tawait Flags.updateOne({_id: enableDebugFlagPDF._id}, {$set: {value: false}});\n\t}\n}"]}
package/http/auth.d.ts CHANGED
@@ -1 +1,2 @@
1
- export declare function setupAuthRoutes(mainServer: any, app: any, serverConfig: any): void;
1
+ import { ResolveIOMainServer } from '../server-app';
2
+ export declare function setupAuthRoutes(mainServer: ResolveIOMainServer, app: any, serverConfig: any): void;
package/http/auth.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var __awaiter=this&&this.__awaiter||function(e,s,t,o){return new(t=t||Promise)(function(n,r){function fulfilled(e){try{step(o.next(e))}catch(e){r(e)}}function rejected(e){try{step(o.throw(e))}catch(e){r(e)}}function step(e){var r;e.done?n(e.value):((r=e.value)instanceof t?r:new t(function(e){e(r)})).then(fulfilled,rejected)}step((o=o.apply(e,s||[])).next())})},__generator=this&&this.__generator||function(s,t){var o,i,a,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},d={next:verb(0),throw:verb(1),return:verb(2)};return"function"==typeof Symbol&&(d[Symbol.iterator]=function(){return this}),d;function verb(n){return function(e){var r=[n,e];if(o)throw new TypeError("Generator is already executing.");for(;l=d&&r[d=0]?0:l;)try{if(o=1,i&&(a=2&r[0]?i.return:r[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;switch(i=0,(r=a?[2&r[0],a.value]:r)[0]){case 0:case 1:a=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,i=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(!(a=0<(a=l.trys).length&&a[a.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3]))l.label=r[1];else if(6===r[0]&&l.label<a[1])l.label=a[1],a=r;else{if(!(a&&l.label<a[2])){a[2]&&l.ops.pop(),l.trys.pop();continue}l.label=a[2],l.ops.push(r)}}r=t.call(s,l)}catch(e){r=[6,e],i=0}finally{o=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}}},user_collection_1=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.setupAuthRoutes=void 0,require("../collections/user.collection")),jwt=require("jsonwebtoken"),handlebars=require("handlebars"),resolveio_server_app_1=require("../resolveio-server-app"),simpl_schema_1=require("simpl-schema"),bodyParser=require("body-parser"),jwt_decode_1=require("jwt-decode"),common_1=require("../util/common");function setupAuthRoutes(d,e,u){var r=this;e.post("/login365",bodyParser.json(),function(i,a){return __awaiter(r,void 0,void 0,function(){var r,n,s,t,o;return __generator(this,function(e){switch(e.label){case 0:return i.headers.origin===u.ROOT_URL||i.headers.origin===u.SEC_ROOT_URL?[3,1]:(a.send(JSON.stringify({error:!0,result:"Invalid header"})),[3,11]);case 1:n=i.body,r=new simpl_schema_1.default({id_token:{type:String}});try{r.validate(n)}catch(e){if(e)return console.error(new Date,"Error in HTTP Check (/login)",e),resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /login365\n\nData Being Checked\n"+JSON.stringify(n,null,2)+"\n\nErrors\n"+JSON.stringify(e,null,2)),a.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2]}return(r=n.id_token.split("&"),n=r[0].split("=")[1],(s=(0,jwt_decode_1.default)(n))&&s.name&&s.preferred_username&&s.oid)?[4,user_collection_1.Users.findOne({"other.ms_oid":s.oid})]:[3,10];case 2:return(t=e.sent())?[3,5]:[4,user_collection_1.Users.findOne({email:s.preferred_username.toLowerCase()})];case 3:return(t=e.sent())?[4,user_collection_1.Users.updateOne({_id:t._id},{$set:{"other.ms_oid":s.oid}})]:[3,5];case 4:e.sent(),e.label=5;case 5:return t?[3,7]:(t={_id:(0,common_1.objectIdHexString)(),__v:0,roles:{super_admin:!1,approvals:[],groups:[],notifications:[],miscs:[]},username:s.preferred_username.toLowerCase(),email:s.preferred_username.toLowerCase(),fullname:s.name,active:!0,phonenumber:"",readonly:!1,other:{ms_oid:s.oid},attempts:0,salt:jwt.sign({now:(Date.now()-1e3).toString()},u.JWT_SECRET,{expiresIn:7776e6}),hash:jwt.sign({now:(Date.now()+1e3).toString()},u.JWT_SECRET,{expiresIn:7776e6}),last:new Date,settings:null,services:null,is_customer:!1},[4,user_collection_1.Users.create(t)]);case 6:return e.sent(),[3,9];case 7:return(o=!1,t.email!==s.preferred_username.toLowerCase()&&(t.email=s.preferred_username.toLowerCase(),o=!0),t.fullname!==s.name&&(t.fullname=s.name,o=!0),o)?[4,user_collection_1.Users.updateOne({_id:t._id},{$set:{email:t.email,fullname:t.fullname}})]:[3,9];case 8:e.sent(),e.label=9;case 9:return a.send(JSON.stringify({error:!1,result:{token:jwt.sign({id_user:t._id},u.JWT_SECRET,{expiresIn:7776e6})}})),[3,11];case 10:console.log("ERROR - 1",r,n,s),a.send(JSON.stringify({error:!0,result:"Invalid Azure Token"})),e.label=11;case 11:return[2]}})})}),e.post("/login",bodyParser.json(),function(a,l){return __awaiter(r,void 0,void 0,function(){var r,n,s,t,o,i;return __generator(this,function(e){switch(e.label){case 0:return a.headers.origin===u.ROOT_URL||a.headers.origin===u.SEC_ROOT_URL?[3,1]:(l.send(JSON.stringify({error:!0,result:"Invalid header"})),[3,8]);case 1:r=a.body,n=new simpl_schema_1.default({username:{type:String},password:{type:String}});try{n.validate(r)}catch(e){if(e)return console.error(new Date,"Error in HTTP Check (/login)",e),resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /login\n\nData Being Checked\n"+JSON.stringify(r,null,2)+"\n\nErrors\n"+JSON.stringify(e,null,2)),l.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2]}return[4,user_collection_1.Users.findOne({active:!0,username:r.username})];case 2:return(s=e.sent())?[3,4]:[4,user_collection_1.Users.findOne({active:!0,email:r.username})];case 3:s=e.sent(),e.label=4;case 4:return s?[4,user_collection_1.Users.authenticate(s,r.password)]:(l.send(JSON.stringify({error:!0,result:"Invalid Username And Password"})),[2]);case 5:return(t=e.sent()).error?("Too Many Attempts"===t.error?(l.send(JSON.stringify({error:!0,result:t.error+". A password reset link has been sent to your email, please reset your password."})),s.services||(s.services={}),s.services.forgot_password=jwt.sign({id_user:s._id},u.JWT_SECRET),o={userToChangePassword:s.fullname,userWhoResetPassword:resolveio_server_app_1.ResolveIOServer.getClientName()+" System",url:u.ROOT_URL+"/forgot-password?"+encodeURIComponent(u.SERVER_URL)+"&"+s.services.forgot_password},user_collection_1.Users.updateOne({_id:s._id},{$set:{services:s.services}}).then(function(e){d.getMethodManager().readFile("email-templates/forgot-password.html").then(function(e){e=handlebars.compile(e);handlebars.registerHelper("equals",function(e,r){return e===r}),d.getMethodManager().sendEmail(s.email,"ResolveIO ("+resolveio_server_app_1.ResolveIOServer.getClientName()+") - Forgot Password","",e(o),null,null,"")},function(e){return console.log(e)})},function(e){})):"No Salt Value Stored"===t.error?(l.send(JSON.stringify({error:!0,result:"A password reset link has been sent to your email, please reset your password."})),s.services||(s.services={}),s.services.forgot_password=jwt.sign({id_user:s._id},u.JWT_SECRET),i={userToChangePassword:s.fullname,userWhoResetPassword:resolveio_server_app_1.ResolveIOServer.getClientName()+" System",url:u.ROOT_URL+"/forgot-password?"+encodeURIComponent(u.SERVER_URL)+"&"+s.services.forgot_password},user_collection_1.Users.updateOne({_id:s._id},{$set:{services:s.services}}).then(function(e){d.getMethodManager().readFile("email-templates/forgot-password.html").then(function(e){e=handlebars.compile(e);handlebars.registerHelper("equals",function(e,r){return e===r}),d.getMethodManager().sendEmail(s.email,"ResolveIO ("+resolveio_server_app_1.ResolveIOServer.getClientName()+") - Forgot Password","",e(i),null,null,"")},function(e){return console.log(e)})},function(e){})):l.send(JSON.stringify({error:!0,result:t.error})),[3,8]):[3,6];case 6:return t&&t.data&&t.data.active?[4,user_collection_1.Users.resetAttempts(t.data)]:[3,8];case 7:e.sent(),l.send(JSON.stringify({error:!1,result:{token:jwt.sign({id_user:t.data._id},u.JWT_SECRET,{expiresIn:7776e6})}})),e.label=8;case 8:return[2]}})})}),e.post("/accessToken",bodyParser.json(),function(t,o){return __awaiter(this,void 0,void 0,function(){var r,n,s=this;return __generator(this,function(e){if(t.headers.origin!==u.ROOT_URL&&t.headers.origin!==u.SEC_ROOT_URL&&t.headers.origin!==u.RESOLVEIO_URL&&t.headers.origin!==u.RESOLVEIO_SECONDARY_URL)o.send(JSON.stringify({error:!0,result:"Invalid header"}));else{r=t.body,n=new simpl_schema_1.default({refreshToken:{type:String}});try{n.validate(r)}catch(e){if(e)return console.error(new Date,"Error in HTTP Check (/accessToken)",e),resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /accessToken\n\nData Being Checked\n"+JSON.stringify(r,null,2)+"\n\nErrors\n"+JSON.stringify(e,null,2)),o.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2]}jwt.verify(r.refreshToken,u.JWT_SECRET,function(e,r){e?o.send(JSON.stringify({error:!0,result:"Invalid Token"})):user_collection_1.Users.findById(r.id_user).then(function(r){return __awaiter(s,void 0,void 0,function(){return __generator(this,function(e){return r?r.active?o.send(JSON.stringify({error:!1,result:{token:jwt.sign({id_user:r._id},u.JWT_SECRET,{expiresIn:2592e5}),user:r}})):o.send(JSON.stringify({error:!0,result:"Account is Disabled"})):o.send(JSON.stringify({error:!0,result:"Invalid User"})),[2]})})},function(e){o.send(JSON.stringify({error:!0,result:"Invalid Mongo Get User"}))})})}return[2]})})}),e.post("/userWithEnrollmentToken",bodyParser.json(),function(e,n){if(e.headers.origin!==u.ROOT_URL&&e.headers.origin!==u.SEC_ROOT_URL&&e.headers.origin!==u.RESOLVEIO_URL&&e.headers.origin!==u.RESOLVEIO_SECONDARY_URL)n.send(JSON.stringify({error:!0,result:"Invalid header"}));else{var s=e.body,e=new simpl_schema_1.default({enrollmentToken:{type:String}});try{e.validate(s)}catch(e){if(e)return console.error(new Date,"Error in HTTP Check (/userWithEnrollmentToken)",e),resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /userWithEnrollmentToken\n\nData Being Checked\n"+JSON.stringify(s,null,2)+"\n\nErrors\n"+JSON.stringify(e,null,2)),void n.send(JSON.stringify({error:!0,result:"Invalid Parameters"}))}jwt.verify(s.enrollmentToken,u.JWT_SECRET,function(e,r){e?n.send(JSON.stringify({error:!0,result:"Invalid Token"})):user_collection_1.Users.findOne({$and:[{_id:r.id_user},{"services.enrollment":s.enrollmentToken}]},{projection:{_id:1,__v:1,username:1,active:1}}).then(function(e){e?e.active?n.send(JSON.stringify({error:!1,result:{user:e}})):n.send(JSON.stringify({error:!0,result:"Account is Disabled"})):n.send(JSON.stringify({error:!0,result:"Invalid User"}))},function(e){n.send(JSON.stringify({error:!0,result:"Invalid Mongo Get User"}))})})}}),e.post("/setUserWithEnrollmentToken",bodyParser.json(),function(e,t){var n=this;if(e.headers.origin!==u.ROOT_URL&&e.headers.origin!==u.SEC_ROOT_URL&&e.headers.origin!==u.RESOLVEIO_URL&&e.headers.origin!==u.RESOLVEIO_SECONDARY_URL)t.send(JSON.stringify({error:!0,result:"Invalid header"}));else{var o=e.body,e=new simpl_schema_1.default({enrollmentToken:{type:String},password:{type:String}});try{e.validate(o)}catch(e){if(e)return console.error(new Date,"Error in HTTP Check (/setUserWithEnrollmentToken)",e),resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /setUserWithEnrollmentToken\n\nData Being Checked\n"+JSON.stringify(o,null,2)+"\n\nErrors\n"+JSON.stringify(e,null,2)),void t.send(JSON.stringify({error:!0,result:"Invalid Parameters"}))}jwt.verify(o.enrollmentToken,u.JWT_SECRET,function(r,s){return __awaiter(n,void 0,void 0,function(){var n=this;return __generator(this,function(e){return r?t.send(JSON.stringify({error:!0,result:"Invalid Token"})):user_collection_1.Users.findOne({$and:[{_id:s.id_user},{"services.enrollment":o.enrollmentToken}]}).then(function(r){return __awaiter(n,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return r?r.active?[4,user_collection_1.Users.setPassword(r,o.password)]:[3,2]:[3,4];case 1:return e.sent(),t.send(JSON.stringify({error:!1,result:!0})),[3,3];case 2:t.send(JSON.stringify({error:!0,result:"Account is Disabled"})),e.label=3;case 3:return[3,5];case 4:t.send(JSON.stringify({error:!0,result:"Invalid User"})),e.label=5;case 5:return[2]}})})},function(e){t.send(JSON.stringify({error:!0,result:"Invalid Mongo Get User"}))}),[2]})})})}}),e.post("/userWithForgotPasswordToken",bodyParser.json(),function(e,n){if(e.headers.origin!==u.ROOT_URL&&e.headers.origin!==u.SEC_ROOT_URL&&e.headers.origin!==u.RESOLVEIO_URL&&e.headers.origin!==u.RESOLVEIO_SECONDARY_URL)n.send(JSON.stringify({error:!0,result:"Invalid header"}));else{var s=e.body,e=new simpl_schema_1.default({forgotPasswordToken:{type:String}});try{e.validate(s)}catch(e){if(e)return console.error(new Date,"Error in HTTP Check (/userWithForgotPasswordToken)",e),resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /userWithForgotPasswordToken\n\nData Being Checked\n"+JSON.stringify(s,null,2)+"\n\nErrors\n"+JSON.stringify(e,null,2)),void n.send(JSON.stringify({error:!0,result:"Invalid Parameters"}))}jwt.verify(s.forgotPasswordToken,u.JWT_SECRET,function(e,r){e?n.send(JSON.stringify({error:!0,result:"Invalid Token"})):user_collection_1.Users.findOne({$and:[{_id:r.id_user},{"services.forgot_password":s.forgotPasswordToken}]},{projection:{_id:1,__v:1,username:1,active:1}}).then(function(e){e?e.active?n.send(JSON.stringify({error:!1,result:{user:e}})):n.send(JSON.stringify({error:!0,result:"Account is Disabled"})):n.send(JSON.stringify({error:!0,result:"Invalid Token"}))},function(e){n.send(JSON.stringify({error:!0,result:"Invalid Mongo Get User"}))})})}}),e.post("/setUserWithForgotPasswordToken",bodyParser.json(),function(e,t){var n=this;if(e.headers.origin!==u.ROOT_URL&&e.headers.origin!==u.SEC_ROOT_URL&&e.headers.origin!==u.RESOLVEIO_URL&&e.headers.origin!==u.RESOLVEIO_SECONDARY_URL)t.send(JSON.stringify({error:!0,result:"Invalid header"}));else{var o=e.body,e=new simpl_schema_1.default({forgotPasswordToken:{type:String},password:{type:String}});try{e.validate(o)}catch(e){if(e)return console.error(new Date,"Error in HTTP Check (/setUserWithForgotPasswordToken)",e),resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /setUserWithForgotPasswordToken\n\nData Being Checked\n"+JSON.stringify(o,null,2)+"\n\nErrors\n"+JSON.stringify(e,null,2)),void t.send(JSON.stringify({error:!0,result:"Invalid Parameters"}))}jwt.verify(o.forgotPasswordToken,u.JWT_SECRET,function(r,s){return __awaiter(n,void 0,void 0,function(){var n=this;return __generator(this,function(e){return r?t.send(JSON.stringify({error:!0,result:"Invalid Token"})):user_collection_1.Users.findOne({$and:[{_id:s.id_user},{"services.forgot_password":o.forgotPasswordToken}]}).then(function(r){return __awaiter(n,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return r?r.active?[4,user_collection_1.Users.setPassword(r,o.password)]:[3,2]:[3,4];case 1:return e.sent(),t.send(JSON.stringify({error:!1,result:!0})),[3,3];case 2:t.send(JSON.stringify({error:!0,result:"Account is Disabled"})),e.label=3;case 3:return[3,5];case 4:t.send(JSON.stringify({error:!0,result:"Invalid User"})),e.label=5;case 5:return[2]}})})},function(e){t.send(JSON.stringify({error:!0,result:"Invalid Mongo Get User"}))}),[2]})})})}}),e.post("/resetPassword",bodyParser.json(),function(t,o){return __awaiter(r,void 0,void 0,function(){var r,n,s;return __generator(this,function(e){switch(e.label){case 0:return t.headers.origin===u.ROOT_URL||t.headers.origin===u.SEC_ROOT_URL?[3,1]:(o.send(JSON.stringify({error:!0,result:"Invalid header"})),[3,5]);case 1:r=t.body,n=new simpl_schema_1.default({username:{type:String}});try{n.validate(r)}catch(e){if(e)return console.error(new Date,"Error in HTTP Check (/resetPassword)",e),resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /resetPassword\n\nData Being Checked\n"+JSON.stringify(r,null,2)+"\n\nErrors\n"+JSON.stringify(e,null,2)),o.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2]}return[4,user_collection_1.Users.findOne({active:!0,username:r.username})];case 2:return(s=e.sent())?[3,4]:[4,user_collection_1.Users.findOne({active:!0,email:r.username})];case 3:s=e.sent(),e.label=4;case 4:s&&d.getMethodManager().callMethod.call(d.getMethodManager(),"resetUserPassword",s._id),o.send(JSON.stringify({error:!1,result:""})),e.label=5;case 5:return[2]}})})})}exports.setupAuthRoutes=setupAuthRoutes;
1
+ "use strict";var __awaiter=this&&this.__awaiter||function(e,n,t,o){return new(t=t||Promise)(function(s,r){function fulfilled(e){try{step(o.next(e))}catch(e){r(e)}}function rejected(e){try{step(o.throw(e))}catch(e){r(e)}}function step(e){var r;e.done?s(e.value):((r=e.value)instanceof t?r:new t(function(e){e(r)})).then(fulfilled,rejected)}step((o=o.apply(e,n||[])).next())})},__generator=this&&this.__generator||function(n,t){var o,a,i,l={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},u={next:verb(0),throw:verb(1),return:verb(2)};return"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function verb(s){return function(e){var r=[s,e];if(o)throw new TypeError("Generator is already executing.");for(;l=u&&r[u=0]?0:l;)try{if(o=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,(r=i?[2&r[0],i.value]:r)[0]){case 0:case 1:i=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,a=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(!(i=0<(i=l.trys).length&&i[i.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3]))l.label=r[1];else if(6===r[0]&&l.label<i[1])l.label=i[1],i=r;else{if(!(i&&l.label<i[2])){i[2]&&l.ops.pop(),l.trys.pop();continue}l.label=i[2],l.ops.push(r)}}r=t.call(n,l)}catch(e){r=[6,e],a=0}finally{o=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}}},bodyParser=(Object.defineProperty(exports,"__esModule",{value:!0}),exports.setupAuthRoutes=void 0,require("body-parser")),handlebars=require("handlebars"),jwt=require("jsonwebtoken"),jwt_decode_1=require("jwt-decode"),simpl_schema_1=require("simpl-schema"),user_collection_1=require("../collections/user.collection"),resolveio_server_app_1=require("../resolveio-server-app"),common_1=require("../util/common");function setupAuthRoutes(d,e,_){var r=this;e.post("/login365",bodyParser.json(),function(l,u){return __awaiter(r,void 0,void 0,function(){var r,s,n,t,o,a,i;return __generator(this,function(e){switch(e.label){case 0:return l.headers.origin===_.ROOT_URL||l.headers.origin===_.SEC_ROOT_URL?[3,1]:(u.send(JSON.stringify({error:!0,result:"Invalid header"})),[3,16]);case 1:r=l.body,s=new simpl_schema_1.default({id_token:{type:String}}),e.label=2;case 2:return e.trys.push([2,3,,6]),s.validate(r),[3,6];case 3:return(i=e.sent())?(console.error(new Date,"Error in HTTP Check (/login)",i),[4,resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /login365\n\nData Being Checked\n"+JSON.stringify(r,null,2)+"\n\nErrors\n"+JSON.stringify(i,null,2))]):[3,5];case 4:return e.sent(),u.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2];case 5:return[3,6];case 6:return(n=r.id_token.split("&"),t=n[0].split("=")[1],(o=(0,jwt_decode_1.default)(t))&&o.name&&o.preferred_username&&o.oid)?[4,user_collection_1.Users.findOne({"other.ms_oid":o.oid})]:[3,15];case 7:return(a=e.sent())?[3,10]:[4,user_collection_1.Users.findOne({email:o.preferred_username.toLowerCase()})];case 8:return(a=e.sent())?[4,user_collection_1.Users.updateOne({_id:a._id},{$set:{"other.ms_oid":o.oid}})]:[3,10];case 9:e.sent(),e.label=10;case 10:return a?[3,12]:(a={_id:(0,common_1.objectIdHexString)(),__v:0,roles:{super_admin:!1,approvals:[],groups:[],notifications:[],miscs:[]},username:o.preferred_username.toLowerCase(),email:o.preferred_username.toLowerCase(),fullname:o.name,active:!0,phonenumber:"",readonly:!1,other:{ms_oid:o.oid},attempts:0,salt:jwt.sign({now:(Date.now()-1e3).toString()},_.JWT_SECRET,{expiresIn:7776e6}),hash:jwt.sign({now:(Date.now()+1e3).toString()},_.JWT_SECRET,{expiresIn:7776e6}),last:new Date,settings:null,services:null,is_customer:!1},[4,user_collection_1.Users.create(a)]);case 11:return e.sent(),[3,14];case 12:return(i=!1,a.email!==o.preferred_username.toLowerCase()&&(a.email=o.preferred_username.toLowerCase(),i=!0),a.fullname!==o.name&&(a.fullname=o.name,i=!0),i)?[4,user_collection_1.Users.updateOne({_id:a._id},{$set:{email:a.email,fullname:a.fullname}})]:[3,14];case 13:e.sent(),e.label=14;case 14:return u.send(JSON.stringify({error:!1,result:{token:jwt.sign({id_user:a._id},_.JWT_SECRET,{expiresIn:7776e6})}})),[3,16];case 15:console.log("ERROR - 1",n,t,o),u.send(JSON.stringify({error:!0,result:"Invalid Azure Token"})),e.label=16;case 16:return[2]}})})}),e.post("/login",bodyParser.json(),function(u,c){return __awaiter(r,void 0,void 0,function(){var r,s,n,t,o,a,i,l;return __generator(this,function(e){switch(e.label){case 0:return u.headers.origin===_.ROOT_URL||u.headers.origin===_.SEC_ROOT_URL?[3,1]:(c.send(JSON.stringify({error:!0,result:"Invalid header"})),[3,20]);case 1:r=u.body,s=new simpl_schema_1.default({username:{type:String},password:{type:String}}),e.label=2;case 2:return e.trys.push([2,3,,6]),s.validate(r),[3,6];case 3:return(n=e.sent())?(console.error(new Date,"Error in HTTP Check (/login)",n),[4,resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /login\n\nData Being Checked\n"+JSON.stringify(r,null,2)+"\n\nErrors\n"+JSON.stringify(n,null,2))]):[3,5];case 4:return e.sent(),c.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2];case 5:return[3,6];case 6:return[4,user_collection_1.Users.findOne({active:!0,username:r.username})];case 7:return(t=e.sent())?[3,9]:[4,user_collection_1.Users.findOne({active:!0,email:r.username})];case 8:t=e.sent(),e.label=9;case 9:return t?[4,user_collection_1.Users.authenticate(t,r.password)]:(c.send(JSON.stringify({error:!0,result:"Invalid Username And Password"})),[2]);case 10:return(o=e.sent()).error?"Too Many Attempts"!==o.error?[3,13]:(c.send(JSON.stringify({error:!0,result:o.error+". A password reset link has been sent to your email, please reset your password."})),t.services||(t.services={}),t.services.forgot_password=jwt.sign({id_user:t._id},_.JWT_SECRET),a={userToChangePassword:t.fullname,userWhoResetPassword:resolveio_server_app_1.ResolveIOServer.getClientName()+" System",url:_.ROOT_URL+"/forgot-password?"+encodeURIComponent(_.SERVER_URL)+"&"+t.services.forgot_password},[4,user_collection_1.Users.updateOne({_id:t._id},{$set:{services:t.services}})]):[3,18];case 11:return e.sent(),i=d.getMethodManager().readFile("email-templates/forgot-password.html"),l=handlebars.compile(i),handlebars.registerHelper("equals",function(e,r){return e===r}),[4,d.getMethodManager().sendEmail(t.email,"ResolveIO ("+resolveio_server_app_1.ResolveIOServer.getClientName()+") - Forgot Password","",l(a),null,null,"")];case 12:return e.sent(),[3,17];case 13:return"No Salt Value Stored"!==o.error?[3,16]:(c.send(JSON.stringify({error:!0,result:"A password reset link has been sent to your email, please reset your password."})),t.services||(t.services={}),t.services.forgot_password=jwt.sign({id_user:t._id},_.JWT_SECRET),a={userToChangePassword:t.fullname,userWhoResetPassword:resolveio_server_app_1.ResolveIOServer.getClientName()+" System",url:_.ROOT_URL+"/forgot-password?"+encodeURIComponent(_.SERVER_URL)+"&"+t.services.forgot_password},[4,user_collection_1.Users.updateOne({_id:t._id},{$set:{services:t.services}})]);case 14:return e.sent(),i=d.getMethodManager().readFile("email-templates/forgot-password.html"),l=handlebars.compile(i),handlebars.registerHelper("equals",function(e,r){return e===r}),[4,d.getMethodManager().sendEmail(t.email,"ResolveIO ("+resolveio_server_app_1.ResolveIOServer.getClientName()+") - Forgot Password","",l(a),null,null,"")];case 15:return e.sent(),[3,17];case 16:c.send(JSON.stringify({error:!0,result:o.error})),e.label=17;case 17:return[3,20];case 18:return o&&o.data&&o.data.active?[4,user_collection_1.Users.resetAttempts(o.data)]:[3,20];case 19:e.sent(),c.send(JSON.stringify({error:!1,result:{token:jwt.sign({id_user:o.data._id},_.JWT_SECRET,{expiresIn:7776e6})}})),e.label=20;case 20:return[2]}})})}),e.post("/accessToken",bodyParser.json(),function(o,a){return __awaiter(r,void 0,void 0,function(){var r,s,n,t=this;return __generator(this,function(e){switch(e.label){case 0:return o.headers.origin===_.ROOT_URL||o.headers.origin===_.SEC_ROOT_URL||o.headers.origin===_.RESOLVEIO_URL||o.headers.origin===_.RESOLVEIO_SECONDARY_URL?[3,1]:(a.send(JSON.stringify({error:!0,result:"Invalid header"})),[3,7]);case 1:r=o.body,s=new simpl_schema_1.default({refreshToken:{type:String}}),e.label=2;case 2:return e.trys.push([2,3,,6]),s.validate(r),[3,6];case 3:return(n=e.sent())?(console.error(new Date,"Error in HTTP Check (/accessToken)",n),[4,resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /accessToken\n\nData Being Checked\n"+JSON.stringify(r,null,2)+"\n\nErrors\n"+JSON.stringify(n,null,2))]):[3,5];case 4:return e.sent(),a.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2];case 5:return[3,6];case 6:jwt.verify(r.refreshToken,_.JWT_SECRET,function(s,n){return __awaiter(t,void 0,void 0,function(){var r;return __generator(this,function(e){switch(e.label){case 0:return s?(a.send(JSON.stringify({error:!0,result:"Invalid Token"})),[3,4]):[3,1];case 1:return e.trys.push([1,3,,4]),[4,user_collection_1.Users.findById(n.id_user)];case 2:return(r=e.sent())?r.active?a.send(JSON.stringify({error:!1,result:{token:jwt.sign({id_user:r._id},_.JWT_SECRET,{expiresIn:2592e5}),user:r}})):a.send(JSON.stringify({error:!0,result:"Account is Disabled"})):a.send(JSON.stringify({error:!0,result:"Invalid User"})),[3,4];case 3:return e.sent(),a.send(JSON.stringify({error:!0,result:"Invalid Mongo Get User"})),[3,4];case 4:return[2]}})})}),e.label=7;case 7:return[2]}})})}),e.post("/userWithEnrollmentToken",bodyParser.json(),function(n,a){return __awaiter(r,void 0,void 0,function(){var t,r,s,o=this;return __generator(this,function(e){switch(e.label){case 0:return n.headers.origin===_.ROOT_URL||n.headers.origin===_.SEC_ROOT_URL||n.headers.origin===_.RESOLVEIO_URL||n.headers.origin===_.RESOLVEIO_SECONDARY_URL?[3,1]:(a.send(JSON.stringify({error:!0,result:"Invalid header"})),[3,7]);case 1:t=n.body,r=new simpl_schema_1.default({enrollmentToken:{type:String}}),e.label=2;case 2:return e.trys.push([2,3,,6]),r.validate(t),[3,6];case 3:return(s=e.sent())?(console.error(new Date,"Error in HTTP Check (/userWithEnrollmentToken)",s),[4,resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /userWithEnrollmentToken\n\nData Being Checked\n"+JSON.stringify(t,null,2)+"\n\nErrors\n"+JSON.stringify(s,null,2))]):[3,5];case 4:return e.sent(),a.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2];case 5:return[3,6];case 6:jwt.verify(t.enrollmentToken,_.JWT_SECRET,function(s,n){return __awaiter(o,void 0,void 0,function(){var r;return __generator(this,function(e){switch(e.label){case 0:return s?(a.send(JSON.stringify({error:!0,result:"Invalid Token"})),[3,4]):[3,1];case 1:return e.trys.push([1,3,,4]),[4,user_collection_1.Users.findOne({$and:[{_id:n.id_user},{"services.enrollment":t.enrollmentToken}]},{projection:{_id:1,__v:1,username:1,active:1}})];case 2:return(r=e.sent())?r.active?a.send(JSON.stringify({error:!1,result:{user:r}})):a.send(JSON.stringify({error:!0,result:"Account is Disabled"})):a.send(JSON.stringify({error:!0,result:"Invalid User"})),[3,4];case 3:return e.sent(),a.send(JSON.stringify({error:!0,result:"Invalid Mongo Get User"})),[3,4];case 4:return[2]}})})}),e.label=7;case 7:return[2]}})})}),e.post("/setUserWithEnrollmentToken",bodyParser.json(),function(n,a){return __awaiter(r,void 0,void 0,function(){var t,r,s,o=this;return __generator(this,function(e){switch(e.label){case 0:return n.headers.origin===_.ROOT_URL||n.headers.origin===_.SEC_ROOT_URL||n.headers.origin===_.RESOLVEIO_URL||n.headers.origin===_.RESOLVEIO_SECONDARY_URL?[3,1]:(a.send(JSON.stringify({error:!0,result:"Invalid header"})),[3,7]);case 1:t=n.body,r=new simpl_schema_1.default({enrollmentToken:{type:String},password:{type:String}}),e.label=2;case 2:return e.trys.push([2,3,,6]),r.validate(t),[3,6];case 3:return(s=e.sent())?(console.error(new Date,"Error in HTTP Check (/setUserWithEnrollmentToken)",s),[4,resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /setUserWithEnrollmentToken\n\nData Being Checked\n"+JSON.stringify(t,null,2)+"\n\nErrors\n"+JSON.stringify(s,null,2))]):[3,5];case 4:return e.sent(),a.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2];case 5:return[3,6];case 6:jwt.verify(t.enrollmentToken,_.JWT_SECRET,function(s,n){return __awaiter(o,void 0,void 0,function(){var r;return __generator(this,function(e){switch(e.label){case 0:return s?(a.send(JSON.stringify({error:!0,result:"Invalid Token"})),[3,9]):[3,1];case 1:return e.trys.push([1,8,,9]),[4,user_collection_1.Users.findOne({$and:[{_id:n.id_user},{"services.enrollment":t.enrollmentToken}]})];case 2:return(r=e.sent())?r.active?[4,user_collection_1.Users.setPassword(r,t.password)]:[3,4]:[3,6];case 3:return e.sent(),a.send(JSON.stringify({error:!1,result:!0})),[3,5];case 4:a.send(JSON.stringify({error:!0,result:"Account is Disabled"})),e.label=5;case 5:return[3,7];case 6:a.send(JSON.stringify({error:!0,result:"Invalid User"})),e.label=7;case 7:return[3,9];case 8:return e.sent(),a.send(JSON.stringify({error:!0,result:"Invalid Mongo Get User"})),[3,9];case 9:return[2]}})})}),e.label=7;case 7:return[2]}})})}),e.post("/userWithForgotPasswordToken",bodyParser.json(),function(n,a){return __awaiter(r,void 0,void 0,function(){var t,r,s,o=this;return __generator(this,function(e){switch(e.label){case 0:return n.headers.origin===_.ROOT_URL||n.headers.origin===_.SEC_ROOT_URL||n.headers.origin===_.RESOLVEIO_URL||n.headers.origin===_.RESOLVEIO_SECONDARY_URL?[3,1]:(a.send(JSON.stringify({error:!0,result:"Invalid header"})),[3,7]);case 1:t=n.body,r=new simpl_schema_1.default({forgotPasswordToken:{type:String}}),e.label=2;case 2:return e.trys.push([2,3,,6]),r.validate(t),[3,6];case 3:return(s=e.sent())?(console.error(new Date,"Error in HTTP Check (/userWithForgotPasswordToken)",s),[4,resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /userWithForgotPasswordToken\n\nData Being Checked\n"+JSON.stringify(t,null,2)+"\n\nErrors\n"+JSON.stringify(s,null,2))]):[3,5];case 4:return e.sent(),a.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2];case 5:return[3,6];case 6:jwt.verify(t.forgotPasswordToken,_.JWT_SECRET,function(s,n){return __awaiter(o,void 0,void 0,function(){var r;return __generator(this,function(e){switch(e.label){case 0:return s?(a.send(JSON.stringify({error:!0,result:"Invalid Token"})),[3,4]):[3,1];case 1:return e.trys.push([1,3,,4]),[4,user_collection_1.Users.findOne({$and:[{_id:n.id_user},{"services.forgot_password":t.forgotPasswordToken}]},{projection:{_id:1,__v:1,username:1,active:1}})];case 2:return(r=e.sent())?r.active?a.send(JSON.stringify({error:!1,result:{user:r}})):a.send(JSON.stringify({error:!0,result:"Account is Disabled"})):a.send(JSON.stringify({error:!0,result:"Invalid Token"})),[3,4];case 3:return e.sent(),a.send(JSON.stringify({error:!0,result:"Invalid Mongo Get User"})),[3,4];case 4:return[2]}})})}),e.label=7;case 7:return[2]}})})}),e.post("/setUserWithForgotPasswordToken",bodyParser.json(),function(n,a){return __awaiter(r,void 0,void 0,function(){var t,r,s,o=this;return __generator(this,function(e){switch(e.label){case 0:return n.headers.origin===_.ROOT_URL||n.headers.origin===_.SEC_ROOT_URL||n.headers.origin===_.RESOLVEIO_URL||n.headers.origin===_.RESOLVEIO_SECONDARY_URL?[3,1]:(a.send(JSON.stringify({error:!0,result:"Invalid header"})),[3,7]);case 1:t=n.body,r=new simpl_schema_1.default({forgotPasswordToken:{type:String},password:{type:String}}),e.label=2;case 2:return e.trys.push([2,3,,6]),r.validate(t),[3,6];case 3:return(s=e.sent())?(console.error(new Date,"Error in HTTP Check (/setUserWithForgotPasswordToken)",s),[4,resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /setUserWithForgotPasswordToken\n\nData Being Checked\n"+JSON.stringify(t,null,2)+"\n\nErrors\n"+JSON.stringify(s,null,2))]):[3,5];case 4:return e.sent(),a.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2];case 5:return[3,6];case 6:jwt.verify(t.forgotPasswordToken,_.JWT_SECRET,function(s,n){return __awaiter(o,void 0,void 0,function(){var r;return __generator(this,function(e){switch(e.label){case 0:return s?(a.send(JSON.stringify({error:!0,result:"Invalid Token"})),[3,9]):[3,1];case 1:return e.trys.push([1,8,,9]),[4,user_collection_1.Users.findOne({$and:[{_id:n.id_user},{"services.forgot_password":t.forgotPasswordToken}]})];case 2:return(r=e.sent())?r.active?[4,user_collection_1.Users.setPassword(r,t.password)]:[3,4]:[3,6];case 3:return e.sent(),a.send(JSON.stringify({error:!1,result:!0})),[3,5];case 4:a.send(JSON.stringify({error:!0,result:"Account is Disabled"})),e.label=5;case 5:return[3,7];case 6:a.send(JSON.stringify({error:!0,result:"Invalid User"})),e.label=7;case 7:return[3,9];case 8:return e.sent(),a.send(JSON.stringify({error:!0,result:"Invalid Mongo Get User"})),[3,9];case 9:return[2]}})})}),e.label=7;case 7:return[2]}})})}),e.post("/resetPassword",bodyParser.json(),function(o,a){return __awaiter(r,void 0,void 0,function(){var r,s,n,t;return __generator(this,function(e){switch(e.label){case 0:return o.headers.origin===_.ROOT_URL||o.headers.origin===_.SEC_ROOT_URL?[3,1]:(a.send(JSON.stringify({error:!0,result:"Invalid header"})),[3,10]);case 1:r=o.body,s=new simpl_schema_1.default({username:{type:String}}),e.label=2;case 2:return e.trys.push([2,3,,6]),s.validate(r),[3,6];case 3:return(n=e.sent())?(console.error(new Date,"Error in HTTP Check (/resetPassword)",n),[4,resolveio_server_app_1.ResolveIOServer.getMainServer().getMethodManager().sendEmail("dev@resolveio.com",resolveio_server_app_1.ResolveIOServer.getClientName()+"HTTP - Error Detected","Match Error On HTTP /resetPassword\n\nData Being Checked\n"+JSON.stringify(r,null,2)+"\n\nErrors\n"+JSON.stringify(n,null,2))]):[3,5];case 4:return e.sent(),a.send(JSON.stringify({error:!0,result:"Invalid Parameters"})),[2];case 5:return[3,6];case 6:return[4,user_collection_1.Users.findOne({active:!0,username:r.username})];case 7:return(t=e.sent())?[3,9]:[4,user_collection_1.Users.findOne({active:!0,email:r.username})];case 8:t=e.sent(),e.label=9;case 9:t&&d.getMethodManager().callMethod.call(d.getMethodManager(),"resetUserPassword",t._id),a.send(JSON.stringify({error:!1,result:""})),e.label=10;case 10:return[2]}})})})}exports.setupAuthRoutes=setupAuthRoutes;
2
2
  //# sourceMappingURL=auth.js.map