@resolveio/server-lib 12.5.52 → 12.5.54

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 (400) hide show
  1. package/.nodemon.json +5 -0
  2. package/.vscode/settings.json +3 -0
  3. package/README.md +22 -0
  4. package/compileDTS.pl +64 -0
  5. package/gulpfile.js +127 -0
  6. package/mongodbensurers.js +2 -0
  7. package/mongostop.js +3 -0
  8. package/package.json +1 -1
  9. package/settings.development.json +13 -0
  10. package/src/client-server-app.ts +7 -0
  11. package/src/collections/app-status.collection.ts +51 -0
  12. package/src/collections/counter.collection.ts +54 -0
  13. package/src/collections/cron-job-history.collection.ts +82 -0
  14. package/src/collections/cron-job.collection.ts +85 -0
  15. package/src/collections/email-history.collection.ts +66 -0
  16. package/src/collections/email-verified.collection.ts +61 -0
  17. package/src/collections/file.collection.ts +73 -0
  18. package/src/collections/flag.collection.ts +56 -0
  19. package/src/collections/log-method-latency.collection.ts +64 -0
  20. package/src/collections/log-subscription.collection.ts +68 -0
  21. package/src/collections/log-ts.collection.ts +78 -0
  22. package/src/collections/log.collection.ts +77 -0
  23. package/src/collections/logged-in-users.collection.ts +65 -0
  24. package/src/collections/method-response.collection.ts +66 -0
  25. package/src/collections/monitor-cpu.collection.ts +63 -0
  26. package/src/collections/monitor-memory.collection.ts +75 -0
  27. package/src/collections/monitor-mongo.collection.ts +69 -0
  28. package/src/collections/notification.collection.ts +51 -0
  29. package/src/collections/report-builder-dashboard-builder.collection.ts +109 -0
  30. package/src/collections/report-builder-library.collection.ts +89 -0
  31. package/src/collections/report-builder-report.collection.ts +149 -0
  32. package/src/collections/user-group.collection.ts +90 -0
  33. package/src/collections/user-guide.collection.ts +57 -0
  34. package/src/collections/user.collection.ts +259 -0
  35. package/src/cron/cron.ts +188 -0
  36. package/src/fixtures/cron-jobs.ts +25 -0
  37. package/src/fixtures/init.ts +10 -0
  38. package/src/http/auth.ts +732 -0
  39. package/src/http/health.ts +7 -0
  40. package/src/http/home.ts +71 -0
  41. package/src/index.ts +71 -0
  42. package/src/managers/cron.manager.ts +208 -0
  43. package/src/managers/method.manager.ts +607 -0
  44. package/src/managers/mongo.manager.ts +2282 -0
  45. package/src/managers/monitor.manager.ts +323 -0
  46. package/src/managers/subscription.manager.ts +1196 -0
  47. package/{managers/subscription.performance.js → src/managers/subscription.performance.ts} +68 -33
  48. package/src/methods/accounts.ts +202 -0
  49. package/src/methods/aws.ts +507 -0
  50. package/src/methods/collections.ts +512 -0
  51. package/src/methods/counters.ts +75 -0
  52. package/src/methods/cron-jobs.ts +1454 -0
  53. package/src/methods/flags.ts +7 -0
  54. package/src/methods/logs.ts +327 -0
  55. package/src/methods/monitor.ts +548 -0
  56. package/src/methods/pdf.ts +615 -0
  57. package/src/methods/report-builder.ts +876 -0
  58. package/src/methods/support.ts +146 -0
  59. package/{models/app-status.model.d.ts → src/models/app-status.model.ts} +3 -2
  60. package/{models/billing-logged-in-users.model.d.ts → src/models/billing-logged-in-users.model.ts} +5 -4
  61. package/src/models/collection-document.model.ts +22 -0
  62. package/{models/counter.model.d.ts → src/models/counter.model.ts} +4 -3
  63. package/src/models/cron-job-history.model.ts +13 -0
  64. package/src/models/cron-job.model.ts +14 -0
  65. package/src/models/dialog.model.ts +25 -0
  66. package/{models/email-history.model.d.ts → src/models/email-history.model.ts} +8 -7
  67. package/{models/email-verified.model.d.ts → src/models/email-verified.model.ts} +6 -5
  68. package/{models/file.model.d.ts → src/models/file.model.ts} +8 -7
  69. package/{models/flag.model.d.ts → src/models/flag.model.ts} +4 -3
  70. package/{models/log-method-latency.model.d.ts → src/models/log-method-latency.model.ts} +5 -4
  71. package/{models/log-subscription.model.d.ts → src/models/log-subscription.model.ts} +8 -6
  72. package/{models/log.model.d.ts → src/models/log.model.ts} +12 -10
  73. package/{models/logged-in-users.model.d.ts → src/models/logged-in-users.model.ts} +6 -5
  74. package/{models/method-response.model.d.ts → src/models/method-response.model.ts} +7 -6
  75. package/src/models/method.model.ts +11 -0
  76. package/{models/monitor-cpu.model.d.ts → src/models/monitor-cpu.model.ts} +9 -7
  77. package/src/models/monitor-memory.model.ts +17 -0
  78. package/src/models/monitor-mongo.model.ts +15 -0
  79. package/{models/notification.model.d.ts → src/models/notification.model.ts} +3 -2
  80. package/src/models/pagination.model.ts +30 -0
  81. package/src/models/permission.model.ts +14 -0
  82. package/src/models/report-builder-dashboard-builder.model.ts +29 -0
  83. package/src/models/report-builder-library.model.ts +20 -0
  84. package/src/models/report-builder-report.model.ts +110 -0
  85. package/src/models/report-builder.model.ts +68 -0
  86. package/src/models/select-data-label.model.ts +9 -0
  87. package/src/models/server-response.model.ts +5 -0
  88. package/src/models/subscription.model.ts +64 -0
  89. package/src/models/support-ticket.model.ts +81 -0
  90. package/src/models/user-group.model.ts +23 -0
  91. package/{models/user-guide.model.d.ts → src/models/user-guide.model.ts} +5 -4
  92. package/src/models/user.model.ts +79 -0
  93. package/{public_api.d.ts → src/public_api.ts} +1 -1
  94. package/src/publications/app-status.ts +13 -0
  95. package/src/publications/cron-jobs.ts +30 -0
  96. package/src/publications/files.ts +34 -0
  97. package/src/publications/flags.ts +20 -0
  98. package/src/publications/logs.ts +164 -0
  99. package/src/publications/method-responses.ts +13 -0
  100. package/src/publications/notifications.ts +13 -0
  101. package/src/publications/report-builder-dashboard-builders.ts +39 -0
  102. package/src/publications/report-builder-libraries.ts +41 -0
  103. package/src/publications/report-builder-reports.ts +48 -0
  104. package/src/publications/super-admin.ts +13 -0
  105. package/src/publications/user-groups.ts +12 -0
  106. package/src/publications/user-guides.ts +12 -0
  107. package/src/server-app.ts +769 -0
  108. package/src/util/common.ts +519 -0
  109. package/src/util/schema-report-builder.ts +413 -0
  110. package/tsconfig.json +30 -0
  111. package/tslint.json +143 -0
  112. package/client-server-app.d.ts +0 -1
  113. package/client-server-app.js +0 -48
  114. package/client-server-app.js.map +0 -1
  115. package/collections/app-status.collection.d.ts +0 -3
  116. package/collections/app-status.collection.js +0 -51
  117. package/collections/app-status.collection.js.map +0 -1
  118. package/collections/counter.collection.d.ts +0 -3
  119. package/collections/counter.collection.js +0 -54
  120. package/collections/counter.collection.js.map +0 -1
  121. package/collections/cron-job-history.collection.d.ts +0 -3
  122. package/collections/cron-job-history.collection.js +0 -82
  123. package/collections/cron-job-history.collection.js.map +0 -1
  124. package/collections/cron-job.collection.d.ts +0 -3
  125. package/collections/cron-job.collection.js +0 -85
  126. package/collections/cron-job.collection.js.map +0 -1
  127. package/collections/email-history.collection.d.ts +0 -3
  128. package/collections/email-history.collection.js +0 -66
  129. package/collections/email-history.collection.js.map +0 -1
  130. package/collections/email-verified.collection.d.ts +0 -3
  131. package/collections/email-verified.collection.js +0 -61
  132. package/collections/email-verified.collection.js.map +0 -1
  133. package/collections/file.collection.d.ts +0 -3
  134. package/collections/file.collection.js +0 -73
  135. package/collections/file.collection.js.map +0 -1
  136. package/collections/flag.collection.d.ts +0 -3
  137. package/collections/flag.collection.js +0 -56
  138. package/collections/flag.collection.js.map +0 -1
  139. package/collections/log-method-latency.collection.d.ts +0 -3
  140. package/collections/log-method-latency.collection.js +0 -64
  141. package/collections/log-method-latency.collection.js.map +0 -1
  142. package/collections/log-subscription.collection.d.ts +0 -3
  143. package/collections/log-subscription.collection.js +0 -68
  144. package/collections/log-subscription.collection.js.map +0 -1
  145. package/collections/log-ts.collection.d.ts +0 -3
  146. package/collections/log-ts.collection.js +0 -78
  147. package/collections/log-ts.collection.js.map +0 -1
  148. package/collections/log.collection.d.ts +0 -3
  149. package/collections/log.collection.js +0 -77
  150. package/collections/log.collection.js.map +0 -1
  151. package/collections/logged-in-users.collection.d.ts +0 -3
  152. package/collections/logged-in-users.collection.js +0 -65
  153. package/collections/logged-in-users.collection.js.map +0 -1
  154. package/collections/method-response.collection.d.ts +0 -3
  155. package/collections/method-response.collection.js +0 -66
  156. package/collections/method-response.collection.js.map +0 -1
  157. package/collections/monitor-cpu.collection.d.ts +0 -3
  158. package/collections/monitor-cpu.collection.js +0 -63
  159. package/collections/monitor-cpu.collection.js.map +0 -1
  160. package/collections/monitor-memory.collection.d.ts +0 -3
  161. package/collections/monitor-memory.collection.js +0 -75
  162. package/collections/monitor-memory.collection.js.map +0 -1
  163. package/collections/monitor-mongo.collection.d.ts +0 -3
  164. package/collections/monitor-mongo.collection.js +0 -69
  165. package/collections/monitor-mongo.collection.js.map +0 -1
  166. package/collections/notification.collection.d.ts +0 -3
  167. package/collections/notification.collection.js +0 -51
  168. package/collections/notification.collection.js.map +0 -1
  169. package/collections/report-builder-dashboard-builder.collection.d.ts +0 -3
  170. package/collections/report-builder-dashboard-builder.collection.js +0 -109
  171. package/collections/report-builder-dashboard-builder.collection.js.map +0 -1
  172. package/collections/report-builder-library.collection.d.ts +0 -3
  173. package/collections/report-builder-library.collection.js +0 -87
  174. package/collections/report-builder-library.collection.js.map +0 -1
  175. package/collections/report-builder-report.collection.d.ts +0 -4
  176. package/collections/report-builder-report.collection.js +0 -149
  177. package/collections/report-builder-report.collection.js.map +0 -1
  178. package/collections/user-group.collection.d.ts +0 -4
  179. package/collections/user-group.collection.js +0 -90
  180. package/collections/user-group.collection.js.map +0 -1
  181. package/collections/user-guide.collection.d.ts +0 -3
  182. package/collections/user-guide.collection.js +0 -57
  183. package/collections/user-guide.collection.js.map +0 -1
  184. package/collections/user.collection.d.ts +0 -4
  185. package/collections/user.collection.js +0 -259
  186. package/collections/user.collection.js.map +0 -1
  187. package/cron/cron.d.ts +0 -5
  188. package/cron/cron.js +0 -162
  189. package/cron/cron.js.map +0 -1
  190. package/fixtures/cron-jobs.d.ts +0 -1
  191. package/fixtures/cron-jobs.js +0 -73
  192. package/fixtures/cron-jobs.js.map +0 -1
  193. package/fixtures/init.d.ts +0 -1
  194. package/fixtures/init.js +0 -59
  195. package/fixtures/init.js.map +0 -1
  196. package/http/auth.d.ts +0 -2
  197. package/http/auth.js +0 -763
  198. package/http/auth.js.map +0 -1
  199. package/http/health.d.ts +0 -1
  200. package/http/health.js +0 -12
  201. package/http/health.js.map +0 -1
  202. package/http/home.d.ts +0 -2
  203. package/http/home.js +0 -66
  204. package/http/home.js.map +0 -1
  205. package/index.d.ts +0 -23
  206. package/index.js +0 -127
  207. package/index.js.map +0 -1
  208. package/managers/cron.manager.d.ts +0 -17
  209. package/managers/cron.manager.js +0 -242
  210. package/managers/cron.manager.js.map +0 -1
  211. package/managers/method.manager.d.ts +0 -38
  212. package/managers/method.manager.js +0 -595
  213. package/managers/method.manager.js.map +0 -1
  214. package/managers/mongo.manager.d.ts +0 -178
  215. package/managers/mongo.manager.js +0 -2221
  216. package/managers/mongo.manager.js.map +0 -1
  217. package/managers/monitor.manager.d.ts +0 -59
  218. package/managers/monitor.manager.js +0 -351
  219. package/managers/monitor.manager.js.map +0 -1
  220. package/managers/subscription.manager.d.ts +0 -50
  221. package/managers/subscription.manager.js +0 -1091
  222. package/managers/subscription.manager.js.map +0 -1
  223. package/managers/subscription.performance.d.ts +0 -1
  224. package/managers/subscription.performance.js.map +0 -1
  225. package/methods/accounts.d.ts +0 -2
  226. package/methods/accounts.js +0 -274
  227. package/methods/accounts.js.map +0 -1
  228. package/methods/aws.d.ts +0 -2
  229. package/methods/aws.js +0 -617
  230. package/methods/aws.js.map +0 -1
  231. package/methods/collections.d.ts +0 -2
  232. package/methods/collections.js +0 -499
  233. package/methods/collections.js.map +0 -1
  234. package/methods/counters.d.ts +0 -2
  235. package/methods/counters.js +0 -122
  236. package/methods/counters.js.map +0 -1
  237. package/methods/cron-jobs.d.ts +0 -2
  238. package/methods/cron-jobs.js +0 -1315
  239. package/methods/cron-jobs.js.map +0 -1
  240. package/methods/flags.d.ts +0 -2
  241. package/methods/flags.js +0 -9
  242. package/methods/flags.js.map +0 -1
  243. package/methods/logs.d.ts +0 -2
  244. package/methods/logs.js +0 -371
  245. package/methods/logs.js.map +0 -1
  246. package/methods/monitor.d.ts +0 -2
  247. package/methods/monitor.js +0 -565
  248. package/methods/monitor.js.map +0 -1
  249. package/methods/pdf.d.ts +0 -2
  250. package/methods/pdf.js +0 -324
  251. package/methods/pdf.js.map +0 -1
  252. package/methods/report-builder.d.ts +0 -2
  253. package/methods/report-builder.js +0 -858
  254. package/methods/report-builder.js.map +0 -1
  255. package/methods/support.d.ts +0 -2
  256. package/methods/support.js +0 -246
  257. package/methods/support.js.map +0 -1
  258. package/models/app-status.model.js +0 -4
  259. package/models/app-status.model.js.map +0 -1
  260. package/models/billing-logged-in-users.model.js +0 -4
  261. package/models/billing-logged-in-users.model.js.map +0 -1
  262. package/models/collection-document.model.d.ts +0 -19
  263. package/models/collection-document.model.js +0 -4
  264. package/models/collection-document.model.js.map +0 -1
  265. package/models/counter.model.js +0 -4
  266. package/models/counter.model.js.map +0 -1
  267. package/models/cron-job-history.model.d.ts +0 -12
  268. package/models/cron-job-history.model.js +0 -4
  269. package/models/cron-job-history.model.js.map +0 -1
  270. package/models/cron-job.model.d.ts +0 -13
  271. package/models/cron-job.model.js +0 -4
  272. package/models/cron-job.model.js.map +0 -1
  273. package/models/dialog.model.d.ts +0 -23
  274. package/models/dialog.model.js +0 -4
  275. package/models/dialog.model.js.map +0 -1
  276. package/models/email-history.model.js +0 -4
  277. package/models/email-history.model.js.map +0 -1
  278. package/models/email-verified.model.js +0 -4
  279. package/models/email-verified.model.js.map +0 -1
  280. package/models/file.model.js +0 -4
  281. package/models/file.model.js.map +0 -1
  282. package/models/flag.model.js +0 -4
  283. package/models/flag.model.js.map +0 -1
  284. package/models/log-method-latency.model.js +0 -4
  285. package/models/log-method-latency.model.js.map +0 -1
  286. package/models/log-subscription.model.js +0 -4
  287. package/models/log-subscription.model.js.map +0 -1
  288. package/models/log.model.js +0 -4
  289. package/models/log.model.js.map +0 -1
  290. package/models/logged-in-users.model.js +0 -4
  291. package/models/logged-in-users.model.js.map +0 -1
  292. package/models/method-response.model.js +0 -4
  293. package/models/method-response.model.js.map +0 -1
  294. package/models/method.model.d.ts +0 -9
  295. package/models/method.model.js +0 -4
  296. package/models/method.model.js.map +0 -1
  297. package/models/monitor-cpu.model.js +0 -4
  298. package/models/monitor-cpu.model.js.map +0 -1
  299. package/models/monitor-memory.model.d.ts +0 -15
  300. package/models/monitor-memory.model.js +0 -4
  301. package/models/monitor-memory.model.js.map +0 -1
  302. package/models/monitor-mongo.model.d.ts +0 -13
  303. package/models/monitor-mongo.model.js +0 -4
  304. package/models/monitor-mongo.model.js.map +0 -1
  305. package/models/notification.model.js +0 -4
  306. package/models/notification.model.js.map +0 -1
  307. package/models/pagination.model.d.ts +0 -10
  308. package/models/pagination.model.js +0 -24
  309. package/models/pagination.model.js.map +0 -1
  310. package/models/permission.model.d.ts +0 -12
  311. package/models/permission.model.js +0 -4
  312. package/models/permission.model.js.map +0 -1
  313. package/models/report-builder-dashboard-builder.model.d.ts +0 -25
  314. package/models/report-builder-dashboard-builder.model.js +0 -4
  315. package/models/report-builder-dashboard-builder.model.js.map +0 -1
  316. package/models/report-builder-library.model.d.ts +0 -17
  317. package/models/report-builder-library.model.js +0 -4
  318. package/models/report-builder-library.model.js.map +0 -1
  319. package/models/report-builder-report.model.d.ts +0 -98
  320. package/models/report-builder-report.model.js +0 -4
  321. package/models/report-builder-report.model.js.map +0 -1
  322. package/models/report-builder.model.d.ts +0 -61
  323. package/models/report-builder.model.js +0 -4
  324. package/models/report-builder.model.js.map +0 -1
  325. package/models/select-data-label.model.d.ts +0 -9
  326. package/models/select-data-label.model.js +0 -4
  327. package/models/select-data-label.model.js.map +0 -1
  328. package/models/server-response.model.d.ts +0 -5
  329. package/models/server-response.model.js +0 -4
  330. package/models/server-response.model.js.map +0 -1
  331. package/models/subscription.model.d.ts +0 -23
  332. package/models/subscription.model.js +0 -4
  333. package/models/subscription.model.js.map +0 -1
  334. package/models/support-ticket.model.d.ts +0 -72
  335. package/models/support-ticket.model.js +0 -4
  336. package/models/support-ticket.model.js.map +0 -1
  337. package/models/user-group.model.d.ts +0 -19
  338. package/models/user-group.model.js +0 -4
  339. package/models/user-group.model.js.map +0 -1
  340. package/models/user-guide.model.js +0 -4
  341. package/models/user-guide.model.js.map +0 -1
  342. package/models/user.model.d.ts +0 -70
  343. package/models/user.model.js +0 -4
  344. package/models/user.model.js.map +0 -1
  345. package/public_api.js +0 -75
  346. package/public_api.js.map +0 -1
  347. package/publications/app-status.d.ts +0 -2
  348. package/publications/app-status.js +0 -17
  349. package/publications/app-status.js.map +0 -1
  350. package/publications/cron-jobs.d.ts +0 -2
  351. package/publications/cron-jobs.js +0 -33
  352. package/publications/cron-jobs.js.map +0 -1
  353. package/publications/files.d.ts +0 -2
  354. package/publications/files.js +0 -37
  355. package/publications/files.js.map +0 -1
  356. package/publications/flags.d.ts +0 -2
  357. package/publications/flags.js +0 -23
  358. package/publications/flags.js.map +0 -1
  359. package/publications/logs.d.ts +0 -2
  360. package/publications/logs.js +0 -165
  361. package/publications/logs.js.map +0 -1
  362. package/publications/method-responses.d.ts +0 -2
  363. package/publications/method-responses.js +0 -17
  364. package/publications/method-responses.js.map +0 -1
  365. package/publications/notifications.d.ts +0 -2
  366. package/publications/notifications.js +0 -17
  367. package/publications/notifications.js.map +0 -1
  368. package/publications/report-builder-dashboard-builders.d.ts +0 -2
  369. package/publications/report-builder-dashboard-builders.js +0 -43
  370. package/publications/report-builder-dashboard-builders.js.map +0 -1
  371. package/publications/report-builder-libraries.d.ts +0 -2
  372. package/publications/report-builder-libraries.js +0 -90
  373. package/publications/report-builder-libraries.js.map +0 -1
  374. package/publications/report-builder-reports.d.ts +0 -2
  375. package/publications/report-builder-reports.js +0 -51
  376. package/publications/report-builder-reports.js.map +0 -1
  377. package/publications/super-admin.d.ts +0 -2
  378. package/publications/super-admin.js +0 -17
  379. package/publications/super-admin.js.map +0 -1
  380. package/publications/user-groups.d.ts +0 -1
  381. package/publications/user-groups.js +0 -17
  382. package/publications/user-groups.js.map +0 -1
  383. package/publications/user-guides.d.ts +0 -1
  384. package/publications/user-guides.js +0 -17
  385. package/publications/user-guides.js.map +0 -1
  386. package/server-app.d.ts +0 -52
  387. package/server-app.js +0 -739
  388. package/server-app.js.map +0 -1
  389. package/util/common.d.ts +0 -25
  390. package/util/common.js +0 -524
  391. package/util/common.js.map +0 -1
  392. package/util/schema-report-builder.d.ts +0 -6
  393. package/util/schema-report-builder.js +0 -453
  394. package/util/schema-report-builder.js.map +0 -1
  395. /package/{private → src/private}/email-templates/enrollment.html +0 -0
  396. /package/{private → src/private}/email-templates/forgot-password.html +0 -0
  397. /package/{private → src/private}/email-templates/support-ticket-deleted.html +0 -0
  398. /package/{private → src/private}/email-templates/support-ticket-modified.html +0 -0
  399. /package/{private → src/private}/email-templates/support-ticket.html +0 -0
  400. /package/{private → src/private}/images/ResolveIO.png +0 -0
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LogSubscriptions = void 0;
4
- var index_1 = require("../index");
5
- var mongo_manager_1 = require("../managers/mongo.manager");
6
- var schema = {
7
- _id: {
8
- type: String,
9
- optional: true
10
- },
11
- __v: {
12
- type: Number,
13
- optional: true
14
- },
15
- updatedAt: {
16
- type: Date,
17
- optional: true
18
- },
19
- createdAt: {
20
- type: Date,
21
- optional: true
22
- },
23
- date: {
24
- type: Date
25
- },
26
- type: {
27
- type: String
28
- },
29
- subscription: {
30
- type: String
31
- },
32
- collection_name: {
33
- type: String
34
- },
35
- subData: {
36
- type: String
37
- }
38
- };
39
- exports.LogSubscriptions = null;
40
- initializeCollection();
41
- function initializeCollection() {
42
- if (index_1.ResolveIOServer && index_1.ResolveIOServer.getMainDB()) {
43
- var model = new mongo_manager_1.MongoManagerModel({
44
- collectionName: 'log-subscriptions',
45
- schema: schema,
46
- useVersionCollection: false,
47
- useReportBuilder: true,
48
- reportBuilderLookupTables: [],
49
- timestamps: true,
50
- createLogs: false,
51
- checkSchema: true,
52
- collectionOptions: null
53
- });
54
- exports.LogSubscriptions = model.collection_main;
55
- exports.LogSubscriptions.createIndex({ date: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 30 });
56
- exports.LogSubscriptions.createIndex({ type: 1 });
57
- exports.LogSubscriptions.createIndex({ collection_name: 1 });
58
- exports.LogSubscriptions.createIndex({ date: 1, type: 1 });
59
- exports.LogSubscriptions.createIndex({ createdAt: 1 });
60
- }
61
- else {
62
- setTimeout(function () {
63
- initializeCollection();
64
- }, 1);
65
- }
66
- }
67
-
68
- //# sourceMappingURL=log-subscription.collection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/collections/log-subscription.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAAsF;AAGtF,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,YAAY,EAAE;QACb,IAAI,EAAE,MAAM;KACZ;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAES,QAAA,gBAAgB,GAAiD,IAAI,CAAC;AAEjF,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QACnD,IAAM,KAAK,GAAG,IAAI,iCAAiB,CAAuB;YACzD,cAAc,EAAE,mBAAmB;YACnC,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,IAAI;YACtB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;SACvB,CAAC,CAAC;QACH,wBAAgB,GAAG,KAAK,CAAC,eAAe,CAAC;QACzC,wBAAgB,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QACjF,wBAAgB,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QACxC,wBAAgB,CAAC,WAAW,CAAC,EAAC,eAAe,EAAE,CAAC,EAAC,CAAC,CAAC;QACnD,wBAAgB,CAAC,WAAW,CAAC,EAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QACjD,wBAAgB,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,CAAC,CAAC;KAC7C;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log-subscription.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { LogSubscriptionModel } from '../models/log-subscription.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tsubscription: {\n\t\ttype: String\n\t},\n\tcollection_name: {\n\t\ttype: String\n\t},\n\tsubData: {\n\t\ttype: String\t\n\t}\n};\n\nexport let LogSubscriptions: MongoManagerCollection<LogSubscriptionModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new MongoManagerModel<LogSubscriptionModel>({\n\t\t\tcollectionName: 'log-subscriptions',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\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\tLogSubscriptions = model.collection_main;\n\t\tLogSubscriptions.createIndex({date: 1}, {expireAfterSeconds: 60 * 60 * 24 * 30});\n\t\tLogSubscriptions.createIndex({type: 1});\n\t\tLogSubscriptions.createIndex({collection_name: 1});\n\t\tLogSubscriptions.createIndex({date: 1, type: 1});\n\t\tLogSubscriptions.createIndex({createdAt: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
@@ -1,3 +0,0 @@
1
- import { MongoManagerCollection } from '../managers/mongo.manager';
2
- import { LogModel } from '../models/log.model';
3
- export declare let Logs: MongoManagerCollection<LogModel>;
@@ -1,78 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Logs = void 0;
4
- var index_1 = require("../index");
5
- var mongo_manager_1 = require("../managers/mongo.manager");
6
- var schema = {
7
- _id: {
8
- type: String,
9
- optional: true
10
- },
11
- createdAt: {
12
- type: Date,
13
- optional: true
14
- },
15
- metadata: {
16
- type: Object
17
- },
18
- 'metadata.type': {
19
- type: String
20
- },
21
- 'metadata.collection': {
22
- type: String
23
- },
24
- id_document: {
25
- type: String
26
- },
27
- payload: {
28
- type: String
29
- },
30
- method: {
31
- type: String
32
- },
33
- id_user: {
34
- type: String
35
- },
36
- user: {
37
- type: String
38
- },
39
- messageId: {
40
- type: Number
41
- },
42
- route: {
43
- type: String
44
- }
45
- };
46
- exports.Logs = null;
47
- initializeCollection();
48
- function initializeCollection() {
49
- if (index_1.ResolveIOServer && index_1.ResolveIOServer.getMainDB()) {
50
- var model = new mongo_manager_1.MongoManagerModel({
51
- collectionName: 'logs',
52
- schema: schema,
53
- useVersionCollection: false,
54
- useReportBuilder: false,
55
- reportBuilderLookupTables: [],
56
- timestamps: true,
57
- createLogs: false,
58
- checkSchema: true,
59
- collectionOptions: null
60
- });
61
- exports.Logs = model.collection_main;
62
- exports.Logs.createIndex({ createdAt: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 90 });
63
- exports.Logs.createIndex({ createdAt: -1, type: 1, id_document: 1 });
64
- exports.Logs.createIndex({ createdAt: -1, type: 1, user: 1 });
65
- exports.Logs.createIndex({ createdAt: -1, type: 1, method: 1 });
66
- exports.Logs.createIndex({ createdAt: -1, type: 1, route: 1 });
67
- exports.Logs.createIndex({ createdAt: -1, type: 1, collection: 1, id_document: 1 });
68
- exports.Logs.createIndex({ createdAt: -1, type: 1, collection: 1, method: 1, route: 1 });
69
- exports.Logs.createIndex({ createdAt: -1, type: 1, collection: 1, route: 1 });
70
- }
71
- else {
72
- setTimeout(function () {
73
- initializeCollection();
74
- }, 1);
75
- }
76
- }
77
-
78
- //# sourceMappingURL=log-ts.collection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/collections/log-ts.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAAsF;AAGtF,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;KACZ;IACD,qBAAqB,EAAE;QACtB,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,SAAS,EAAE;QACV,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAES,QAAA,IAAI,GAAqC,IAAI,CAAC;AAEzD,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QACnD,IAAM,KAAK,GAAG,IAAI,iCAAiB,CAAW;YAC7C,cAAc,EAAE,MAAM;YACtB,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;SACvB,CAAC,CAAC;QACH,YAAI,GAAG,KAAK,CAAC,eAAe,CAAC;QAC7B,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QAC1E,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAC,CAAC,CAAC;QAC3D,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QACpD,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;QACtD,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAC,CAAC,CAAC;QACrD,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAC,CAAC,CAAC;QAC1E,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAC,CAAC,CAAC;QAC/E,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAC,CAAC,CAAC;KACpE;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log-ts.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { LogModel } from '../models/log.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tmetadata: {\n\t\ttype: Object\n\t},\n\t'metadata.type': {\n\t\ttype: String\n\t},\n\t'metadata.collection': {\n\t\ttype: String\n\t},\n\tid_document: {\n\t\ttype: String\n\t},\n\tpayload: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\troute: {\n\t\ttype: String\n\t}\n};\n\nexport let Logs: MongoManagerCollection<LogModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new MongoManagerModel<LogModel>({\n\t\t\tcollectionName: 'logs',\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\tLogs = model.collection_main;\n\t\tLogs.createIndex({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 90});\n\t\tLogs.createIndex({createdAt: -1, type: 1, id_document: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, user: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, method: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, route: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, collection: 1, id_document: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, collection: 1, method: 1, route: 1});\n\t\tLogs.createIndex({createdAt: -1, type: 1, collection: 1, route: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
@@ -1,3 +0,0 @@
1
- import { MongoManagerCollection } from '../managers/mongo.manager';
2
- import { LogModel } from '../models/log.model';
3
- export declare let Logs: MongoManagerCollection<LogModel>;
@@ -1,77 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Logs = void 0;
4
- var index_1 = require("../index");
5
- var mongo_manager_1 = require("../managers/mongo.manager");
6
- var schema = {
7
- _id: {
8
- type: String,
9
- optional: true
10
- },
11
- __v: {
12
- type: Number,
13
- optional: true
14
- },
15
- updatedAt: {
16
- type: Date,
17
- optional: true
18
- },
19
- createdAt: {
20
- type: Date,
21
- optional: true
22
- },
23
- type: {
24
- type: String
25
- },
26
- collection: {
27
- type: String
28
- },
29
- id_document: {
30
- type: String
31
- },
32
- payload: {
33
- type: String
34
- },
35
- method: {
36
- type: String
37
- },
38
- id_user: {
39
- type: String
40
- },
41
- user: {
42
- type: String
43
- },
44
- messageId: {
45
- type: Number
46
- },
47
- route: {
48
- type: String
49
- }
50
- };
51
- exports.Logs = null;
52
- initializeCollection();
53
- function initializeCollection() {
54
- if (index_1.ResolveIOServer && index_1.ResolveIOServer.getMainDB()) {
55
- var model = new mongo_manager_1.MongoManagerModel({
56
- collectionName: 'logs',
57
- schema: schema,
58
- useVersionCollection: false,
59
- useReportBuilder: false,
60
- reportBuilderLookupTables: [],
61
- timestamps: true,
62
- createLogs: false,
63
- checkSchema: true,
64
- collectionOptions: null
65
- });
66
- exports.Logs = model.collection_main;
67
- exports.Logs.createIndex({ createdAt: 1 }, { expireAfterSeconds: 60 * 60 * 24 * 90 });
68
- exports.Logs.createIndex({ createdAt: -1, type: 1, id_document: 1 });
69
- }
70
- else {
71
- setTimeout(function () {
72
- initializeCollection();
73
- }, 1);
74
- }
75
- }
76
-
77
- //# sourceMappingURL=log.collection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/collections/log.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAAsF;AAGtF,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,SAAS,EAAE;QACV,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAES,QAAA,IAAI,GAAqC,IAAI,CAAC;AAEzD,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QACnD,IAAM,KAAK,GAAG,IAAI,iCAAiB,CAAW;YAC7C,cAAc,EAAE,MAAM;YACtB,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;SACvB,CAAC,CAAC;QACH,YAAI,GAAG,KAAK,CAAC,eAAe,CAAC;QAC7B,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QAC1E,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAC,CAAC,CAAC;KAC3D;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"log.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { LogModel } from '../models/log.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tcollection: {\n\t\ttype: String\n\t},\n\tid_document: {\n\t\ttype: String\n\t},\n\tpayload: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\troute: {\n\t\ttype: String\n\t}\n};\n\nexport let Logs: MongoManagerCollection<LogModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new MongoManagerModel<LogModel>({\n\t\t\tcollectionName: 'logs',\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\tLogs = model.collection_main;\n\t\tLogs.createIndex({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 90});\n\t\tLogs.createIndex({createdAt: -1, type: 1, id_document: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
@@ -1,3 +0,0 @@
1
- import { MongoManagerCollection } from '../managers/mongo.manager';
2
- import { LoggedInUserModel } from '../models/logged-in-users.model';
3
- export declare let LoggedInUsers: MongoManagerCollection<LoggedInUserModel>;
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LoggedInUsers = void 0;
4
- var index_1 = require("../index");
5
- var mongo_manager_1 = require("../managers/mongo.manager");
6
- var schema = {
7
- _id: {
8
- type: String,
9
- optional: true
10
- },
11
- __v: {
12
- type: Number,
13
- optional: true
14
- },
15
- updatedAt: {
16
- type: Date,
17
- optional: true
18
- },
19
- createdAt: {
20
- type: Date,
21
- optional: true
22
- },
23
- date: {
24
- type: Date
25
- },
26
- id_user: {
27
- type: String
28
- },
29
- user: {
30
- type: String
31
- },
32
- id_ws: {
33
- type: String
34
- },
35
- latency: {
36
- type: Number,
37
- optional: true
38
- }
39
- };
40
- exports.LoggedInUsers = null;
41
- initializeCollection();
42
- function initializeCollection() {
43
- if (index_1.ResolveIOServer && index_1.ResolveIOServer.getMainDB()) {
44
- var model = new mongo_manager_1.MongoManagerModel({
45
- collectionName: 'logged-in-users',
46
- schema: schema,
47
- useVersionCollection: false,
48
- useReportBuilder: false,
49
- reportBuilderLookupTables: [],
50
- timestamps: true,
51
- createLogs: false,
52
- checkSchema: true,
53
- collectionOptions: null
54
- });
55
- exports.LoggedInUsers = model.collection_main;
56
- exports.LoggedInUsers.createIndex({ id_ws: 1 });
57
- }
58
- else {
59
- setTimeout(function () {
60
- initializeCollection();
61
- }, 1);
62
- }
63
- }
64
-
65
- //# sourceMappingURL=logged-in-users.collection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/collections/logged-in-users.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAAsF;AAGtF,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAES,QAAA,aAAa,GAA8C,IAAI,CAAC;AAE3E,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QACnD,IAAM,KAAK,GAAG,IAAI,iCAAiB,CAAoB;YACtD,cAAc,EAAE,iBAAiB;YACjC,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;SACvB,CAAC,CAAC;QACH,qBAAa,GAAG,KAAK,CAAC,eAAe,CAAC;QACtC,qBAAa,CAAC,WAAW,CAAC,EAAC,KAAK,EAAE,CAAC,EAAC,CAAC,CAAC;KACtC;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"logged-in-users.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { LoggedInUserModel } from '../models/logged-in-users.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tid_ws: {\n\t\ttype: String\n\t},\n\tlatency: {\n\t\ttype: Number,\n\t\toptional: true\n\t}\n};\n\nexport let LoggedInUsers: MongoManagerCollection<LoggedInUserModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new MongoManagerModel<LoggedInUserModel>({\n\t\t\tcollectionName: 'logged-in-users',\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\tLoggedInUsers = model.collection_main;\n\t\tLoggedInUsers.createIndex({id_ws: 1});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
@@ -1,3 +0,0 @@
1
- import { MongoManagerCollection } from '../managers/mongo.manager';
2
- import { MethodResponseModel } from '../models/method-response.model';
3
- export declare let MethodResponses: MongoManagerCollection<MethodResponseModel>;
@@ -1,66 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MethodResponses = void 0;
4
- var index_1 = require("../index");
5
- var mongo_manager_1 = require("../managers/mongo.manager");
6
- var schema = {
7
- _id: {
8
- type: String,
9
- optional: true
10
- },
11
- __v: {
12
- type: Number,
13
- optional: true
14
- },
15
- updatedAt: {
16
- type: Date,
17
- optional: true
18
- },
19
- createdAt: {
20
- type: Date,
21
- optional: true
22
- },
23
- id_user: {
24
- type: String
25
- },
26
- message_id: {
27
- type: Number
28
- },
29
- method: {
30
- type: String
31
- },
32
- response: {
33
- type: Object,
34
- blackbox: true
35
- },
36
- date: {
37
- type: Date
38
- }
39
- };
40
- exports.MethodResponses = null;
41
- initializeCollection();
42
- function initializeCollection() {
43
- if (index_1.ResolveIOServer && index_1.ResolveIOServer.getMainDB()) {
44
- var model = new mongo_manager_1.MongoManagerModel({
45
- collectionName: 'method-responses',
46
- schema: schema,
47
- useVersionCollection: false,
48
- useReportBuilder: false,
49
- reportBuilderLookupTables: [],
50
- timestamps: true,
51
- createLogs: false,
52
- checkSchema: true,
53
- collectionOptions: null
54
- });
55
- exports.MethodResponses = model.collection_main;
56
- exports.MethodResponses.createIndex({ id_user: 1, message_id: 1 });
57
- exports.MethodResponses.createIndex({ createdAt: 1 }, { expireAfterSeconds: 86400 });
58
- }
59
- else {
60
- setTimeout(function () {
61
- initializeCollection();
62
- }, 1);
63
- }
64
- }
65
-
66
- //# sourceMappingURL=method-response.collection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/collections/method-response.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAAsF;AAGtF,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;CACD,CAAC;AAES,QAAA,eAAe,GAAgD,IAAI,CAAC;AAE/E,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QACnD,IAAM,KAAK,GAAG,IAAI,iCAAiB,CAAsB;YACxD,cAAc,EAAE,kBAAkB;YAClC,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;SACvB,CAAC,CAAC;QACH,uBAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QACxC,uBAAe,CAAC,WAAW,CAAC,EAAC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC,CAAC;QACzD,uBAAe,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,KAAK,EAAC,CAAC,CAAC;KACzE;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"method-response.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { MethodResponseModel } from '../models/method-response.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: Number\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tresponse: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t}\n};\n\nexport let MethodResponses: MongoManagerCollection<MethodResponseModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new MongoManagerModel<MethodResponseModel>({\n\t\t\tcollectionName: 'method-responses',\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\tMethodResponses = model.collection_main;\n\t\tMethodResponses.createIndex({id_user: 1, message_id: 1});\n\t\tMethodResponses.createIndex({createdAt: 1}, {expireAfterSeconds: 86400});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
@@ -1,3 +0,0 @@
1
- import { MongoManagerCollection } from '../managers/mongo.manager';
2
- import { MonitorCPUModel } from '../models/monitor-cpu.model';
3
- export declare let MonitorCPUs: MongoManagerCollection<MonitorCPUModel>;
@@ -1,63 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MonitorCPUs = void 0;
4
- var index_1 = require("../index");
5
- var mongo_manager_1 = require("../managers/mongo.manager");
6
- var schema = {
7
- _id: {
8
- type: String,
9
- optional: true
10
- },
11
- metadata: {
12
- type: Object
13
- },
14
- 'metadata.client': {
15
- type: String
16
- },
17
- 'metadata.instance': {
18
- type: String
19
- },
20
- date: {
21
- type: Date
22
- },
23
- app: {
24
- type: Number
25
- },
26
- system: {
27
- type: Number
28
- }
29
- };
30
- exports.MonitorCPUs = null;
31
- initializeCollection();
32
- function initializeCollection() {
33
- if (index_1.ResolveIOServer && index_1.ResolveIOServer.getMainDB()) {
34
- var model = new mongo_manager_1.MongoManagerModel({
35
- collectionName: 'monitor-cpus',
36
- schema: schema,
37
- useVersionCollection: false,
38
- useReportBuilder: false,
39
- reportBuilderLookupTables: [],
40
- timestamps: false,
41
- createLogs: false,
42
- checkSchema: false,
43
- collectionOptions: {
44
- timeseries: {
45
- timeField: 'date',
46
- granularity: 'seconds',
47
- metaField: 'metadata'
48
- },
49
- expireAfterSeconds: 60 * 60 * 24 * 3
50
- }
51
- });
52
- exports.MonitorCPUs = model.collection_main;
53
- exports.MonitorCPUs.createIndex({ 'metadata.client': 1, date: 1 });
54
- exports.MonitorCPUs.createIndex({ 'metadata.client': 1, 'metadata.instance': 1, date: 1 });
55
- }
56
- else {
57
- setTimeout(function () {
58
- initializeCollection();
59
- }, 1);
60
- }
61
- }
62
-
63
- //# sourceMappingURL=monitor-cpu.collection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/collections/monitor-cpu.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAAsF;AAGtF,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,iBAAiB,EAAE;QAClB,IAAI,EAAE,MAAM;KACZ;IACD,mBAAmB,EAAE;QACpB,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAES,QAAA,WAAW,GAA4C,IAAI,CAAC;AAEvE,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QACnD,IAAM,KAAK,GAAG,IAAI,iCAAiB,CAAkB;YACpD,cAAc,EAAE,cAAc;YAC9B,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,KAAK;YAClB,iBAAiB,EAAE;gBAClB,UAAU,EAAE;oBACX,SAAS,EAAE,MAAM;oBACjB,WAAW,EAAE,SAAS;oBACtB,SAAS,EAAE,UAAU;iBACrB;gBACD,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;aACpC;SACD,CAAC,CAAC;QACH,mBAAW,GAAG,KAAK,CAAC,eAAe,CAAC;QACpC,mBAAW,CAAC,WAAW,CAAC,EAAC,iBAAiB,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QACzD,mBAAW,CAAC,WAAW,CAAC,EAAC,iBAAiB,EAAE,CAAC,EAAE,mBAAmB,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;KACjF;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-cpu.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { MonitorCPUModel } from '../models/monitor-cpu.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\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\tapp: {\n\t\ttype: Number\n\t},\n\tsystem: {\n\t\ttype: Number\n\t}\n};\n\nexport let MonitorCPUs: MongoManagerCollection<MonitorCPUModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new MongoManagerModel<MonitorCPUModel>({\n\t\t\tcollectionName: 'monitor-cpus',\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});\n\t\tMonitorCPUs = model.collection_main;\n\t\tMonitorCPUs.createIndex({'metadata.client': 1, date: 1});\n\t\tMonitorCPUs.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,3 +0,0 @@
1
- import { MongoManagerCollection } from '../managers/mongo.manager';
2
- import { MonitorMemoryModel } from '../models/monitor-memory.model';
3
- export declare let MonitorMemorys: MongoManagerCollection<MonitorMemoryModel>;
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MonitorMemorys = void 0;
4
- var index_1 = require("../index");
5
- var mongo_manager_1 = require("../managers/mongo.manager");
6
- var schema = {
7
- _id: {
8
- type: String,
9
- optional: true
10
- },
11
- metadata: {
12
- type: Object
13
- },
14
- 'metadata.client': {
15
- type: String
16
- },
17
- 'metadata.instance': {
18
- type: String
19
- },
20
- date: {
21
- type: Date
22
- },
23
- physical_total: {
24
- type: Number
25
- },
26
- physical_used: {
27
- type: Number
28
- },
29
- physical_free: {
30
- type: Number
31
- },
32
- virtual: {
33
- type: Number
34
- },
35
- private: {
36
- type: Number
37
- },
38
- physical: {
39
- type: Number
40
- }
41
- };
42
- exports.MonitorMemorys = null;
43
- initializeCollection();
44
- function initializeCollection() {
45
- if (index_1.ResolveIOServer && index_1.ResolveIOServer.getMainDB()) {
46
- var model = new mongo_manager_1.MongoManagerModel({
47
- collectionName: 'monitor-memorys',
48
- schema: schema,
49
- useVersionCollection: false,
50
- useReportBuilder: false,
51
- reportBuilderLookupTables: [],
52
- timestamps: false,
53
- createLogs: false,
54
- checkSchema: false,
55
- collectionOptions: {
56
- timeseries: {
57
- timeField: 'date',
58
- granularity: 'seconds',
59
- metaField: 'metadata'
60
- },
61
- expireAfterSeconds: 60 * 60 * 24 * 3
62
- }
63
- });
64
- exports.MonitorMemorys = model.collection_main;
65
- exports.MonitorMemorys.createIndex({ 'metadata.client': 1, date: 1 });
66
- exports.MonitorMemorys.createIndex({ 'metadata.client': 1, 'metadata.instance': 1, date: 1 });
67
- }
68
- else {
69
- setTimeout(function () {
70
- initializeCollection();
71
- }, 1);
72
- }
73
- }
74
-
75
- //# sourceMappingURL=monitor-memory.collection.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/collections/monitor-memory.collection.ts"],"names":[],"mappings":";;;AAAA,kCAA2C;AAC3C,2DAAsF;AAGtF,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,iBAAiB,EAAE;QAClB,IAAI,EAAE,MAAM;KACZ;IACD,mBAAmB,EAAE;QACpB,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,cAAc,EAAE;QACf,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAES,QAAA,cAAc,GAA+C,IAAI,CAAC;AAE7E,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,uBAAe,IAAI,uBAAe,CAAC,SAAS,EAAE,EAAE;QACnD,IAAM,KAAK,GAAG,IAAI,iCAAiB,CAAqB;YACvD,cAAc,EAAE,iBAAiB;YACjC,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,KAAK;YAClB,iBAAiB,EAAE;gBAClB,UAAU,EAAE;oBACX,SAAS,EAAE,MAAM;oBACjB,WAAW,EAAE,SAAS;oBACtB,SAAS,EAAE,UAAU;iBACrB;gBACD,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;aACpC;SACD,CAAC,CAAC;QACH,sBAAc,GAAG,KAAK,CAAC,eAAe,CAAC;QACvC,sBAAc,CAAC,WAAW,CAAC,EAAC,iBAAiB,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;QAC5D,sBAAc,CAAC,WAAW,CAAC,EAAC,iBAAiB,EAAE,CAAC,EAAE,mBAAmB,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;KACpF;SACI;QACJ,UAAU,CAAC;YACV,oBAAoB,EAAE,CAAC;QACxB,CAAC,EAAE,CAAC,CAAC,CAAC;KACN;AACF,CAAC","file":"monitor-memory.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\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()) {\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});\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,3 +0,0 @@
1
- import { MongoManagerCollection } from '../managers/mongo.manager';
2
- import { MonitorMongoModel } from '../models/monitor-mongo.model';
3
- export declare let MonitorMongos: MongoManagerCollection<MonitorMongoModel>;
@@ -1,69 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MonitorMongos = void 0;
4
- var index_1 = require("../index");
5
- var mongo_manager_1 = require("../managers/mongo.manager");
6
- var schema = {
7
- _id: {
8
- type: String,
9
- optional: true
10
- },
11
- metadata: {
12
- type: Object
13
- },
14
- 'metadata.client': {
15
- type: String
16
- },
17
- 'metadata.instance': {
18
- type: String
19
- },
20
- date: {
21
- type: Date
22
- },
23
- method: {
24
- type: String
25
- },
26
- doc_collection: {
27
- type: String
28
- },
29
- duration: {
30
- type: Number
31
- },
32
- query: {
33
- type: String
34
- }
35
- };
36
- exports.MonitorMongos = null;
37
- initializeCollection();
38
- function initializeCollection() {
39
- if (index_1.ResolveIOServer && index_1.ResolveIOServer.getMainDB()) {
40
- var model = new mongo_manager_1.MongoManagerModel({
41
- collectionName: 'monitor-mongos',
42
- schema: schema,
43
- useVersionCollection: false,
44
- useReportBuilder: false,
45
- reportBuilderLookupTables: [],
46
- timestamps: false,
47
- createLogs: false,
48
- checkSchema: false,
49
- collectionOptions: {
50
- timeseries: {
51
- timeField: 'date',
52
- granularity: 'seconds',
53
- metaField: 'metadata'
54
- },
55
- expireAfterSeconds: 60 * 60 * 24 * 3
56
- }
57
- });
58
- exports.MonitorMongos = model.collection_main;
59
- exports.MonitorMongos.createIndex({ 'metadata.client': 1, date: 1 });
60
- exports.MonitorMongos.createIndex({ 'metadata.client': 1, 'metadata.instance': 1, date: 1 });
61
- }
62
- else {
63
- setTimeout(function () {
64
- initializeCollection();
65
- }, 1);
66
- }
67
- }
68
-
69
- //# sourceMappingURL=monitor-mongo.collection.js.map