easywork-common-lib 1.0.463 → 1.0.466

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 (389) hide show
  1. package/.gitattributes +2 -2
  2. package/.github/workflows/npm-publish.yml +33 -33
  3. package/.vscode/settings.json +12 -12
  4. package/dist/common/@types/enums/crm.enum.d.ts +8 -0
  5. package/dist/common/@types/enums/crm.enum.js +14 -0
  6. package/dist/common/@types/enums/crm.enum.js.map +1 -0
  7. package/dist/common/@types/enums/index.d.ts +3 -0
  8. package/dist/common/@types/enums/index.js +20 -0
  9. package/dist/common/@types/enums/index.js.map +1 -0
  10. package/dist/common/@types/enums/misc.enum.d.ts +60 -0
  11. package/dist/common/@types/enums/misc.enum.js +81 -0
  12. package/dist/common/@types/enums/misc.enum.js.map +1 -0
  13. package/dist/common/@types/enums/permission.enum.d.ts +13 -0
  14. package/dist/common/@types/enums/permission.enum.js +19 -0
  15. package/dist/common/@types/enums/permission.enum.js.map +1 -0
  16. package/dist/common/@types/index.d.ts +2 -0
  17. package/dist/common/@types/index.js +19 -0
  18. package/dist/common/@types/index.js.map +1 -0
  19. package/dist/common/@types/interfaces/authentication.interface.d.ts +17 -0
  20. package/dist/common/@types/interfaces/authentication.interface.js +3 -0
  21. package/dist/common/@types/interfaces/authentication.interface.js.map +1 -0
  22. package/dist/common/@types/interfaces/crm.interface.d.ts +131 -0
  23. package/dist/common/@types/interfaces/crm.interface.js +3 -0
  24. package/dist/common/@types/interfaces/crm.interface.js.map +1 -0
  25. package/dist/common/@types/interfaces/file.interface.d.ts +14 -0
  26. package/dist/common/@types/interfaces/file.interface.js +3 -0
  27. package/dist/common/@types/interfaces/file.interface.js.map +1 -0
  28. package/dist/common/@types/interfaces/index.d.ts +5 -0
  29. package/dist/common/@types/interfaces/index.js +22 -0
  30. package/dist/common/@types/interfaces/index.js.map +1 -0
  31. package/dist/common/@types/interfaces/mail.interface.d.ts +9 -0
  32. package/dist/common/@types/interfaces/mail.interface.js +3 -0
  33. package/dist/common/@types/interfaces/mail.interface.js.map +1 -0
  34. package/dist/common/@types/interfaces/validator.interface.d.ts +41 -0
  35. package/dist/common/@types/interfaces/validator.interface.js +3 -0
  36. package/dist/common/@types/interfaces/validator.interface.js.map +1 -0
  37. package/dist/common/constants/app.contants.d.ts +31 -0
  38. package/dist/common/constants/app.contants.js +185 -0
  39. package/dist/common/constants/app.contants.js.map +1 -0
  40. package/dist/common/constants/index.d.ts +2 -0
  41. package/dist/common/constants/index.js +19 -0
  42. package/dist/common/constants/index.js.map +1 -0
  43. package/dist/common/constants/regex.constant.d.ts +6 -0
  44. package/dist/common/constants/regex.constant.js +10 -0
  45. package/dist/common/constants/regex.constant.js.map +1 -0
  46. package/dist/common/database/base.entity.d.ts +15 -0
  47. package/dist/common/database/base.entity.js +76 -0
  48. package/dist/common/database/base.entity.js.map +1 -0
  49. package/dist/common/database/comment.base.entity.d.ts +11 -0
  50. package/dist/common/database/comment.base.entity.js +83 -0
  51. package/dist/common/database/comment.base.entity.js.map +1 -0
  52. package/dist/common/database/index.d.ts +2 -0
  53. package/dist/common/database/index.js +19 -0
  54. package/dist/common/database/index.js.map +1 -0
  55. package/dist/common/dtos/index.d.ts +1 -0
  56. package/dist/common/dtos/index.js +18 -0
  57. package/dist/common/dtos/index.js.map +1 -0
  58. package/dist/common/dtos/send-notification.dto.d.ts +11 -0
  59. package/dist/common/dtos/send-notification.dto.js +60 -0
  60. package/dist/common/dtos/send-notification.dto.js.map +1 -0
  61. package/dist/common/enums/drive.enum.d.ts +20 -0
  62. package/dist/common/enums/drive.enum.js +26 -0
  63. package/dist/common/enums/drive.enum.js.map +1 -0
  64. package/dist/common/enums/index.d.ts +4 -0
  65. package/dist/common/enums/index.js +21 -0
  66. package/dist/common/enums/index.js.map +1 -0
  67. package/dist/common/enums/notification.enum.d.ts +32 -0
  68. package/dist/common/enums/notification.enum.js +39 -0
  69. package/dist/common/enums/notification.enum.js.map +1 -0
  70. package/dist/common/enums/sales.enum.d.ts +41 -0
  71. package/dist/common/enums/sales.enum.js +53 -0
  72. package/dist/common/enums/sales.enum.js.map +1 -0
  73. package/dist/common/enums/tools.enum.d.ts +19 -0
  74. package/dist/common/enums/tools.enum.js +26 -0
  75. package/dist/common/enums/tools.enum.js.map +1 -0
  76. package/dist/common/functions/cripto.d.ts +1 -0
  77. package/dist/common/functions/cripto.js +8 -0
  78. package/dist/common/functions/cripto.js.map +1 -0
  79. package/dist/common/functions/image.d.ts +2 -0
  80. package/dist/common/functions/image.js +14 -0
  81. package/dist/common/functions/image.js.map +1 -0
  82. package/dist/common/functions/index.d.ts +2 -0
  83. package/dist/common/functions/index.js +19 -0
  84. package/dist/common/functions/index.js.map +1 -0
  85. package/dist/common/helpers/app.utils.d.ts +5 -0
  86. package/dist/common/helpers/app.utils.js +32 -0
  87. package/dist/common/helpers/app.utils.js.map +1 -0
  88. package/dist/common/helpers/helpers.utils.d.ts +5 -0
  89. package/dist/common/helpers/helpers.utils.js +26 -0
  90. package/dist/common/helpers/helpers.utils.js.map +1 -0
  91. package/dist/common/helpers/index.d.ts +2 -0
  92. package/dist/common/helpers/index.js +19 -0
  93. package/dist/common/helpers/index.js.map +1 -0
  94. package/dist/common/index.d.ts +8 -0
  95. package/dist/common/index.js +25 -0
  96. package/dist/common/index.js.map +1 -0
  97. package/dist/common/interceptors/index.d.ts +1 -0
  98. package/dist/common/interceptors/index.js +18 -0
  99. package/dist/common/interceptors/index.js.map +1 -0
  100. package/dist/common/interceptors/security.interceptor.d.ts +5 -0
  101. package/dist/common/interceptors/security.interceptor.js +22 -0
  102. package/dist/common/interceptors/security.interceptor.js.map +1 -0
  103. package/dist/entities/app_config/app-config.entity.d.ts +5 -0
  104. package/dist/entities/app_config/app-config.entity.js +33 -0
  105. package/dist/entities/app_config/app-config.entity.js.map +1 -0
  106. package/dist/entities/currency.entity.d.ts +6 -0
  107. package/dist/entities/currency.entity.js +43 -0
  108. package/dist/entities/currency.entity.js.map +1 -0
  109. package/dist/entities/drive/attached_object.entity.d.ts +21 -0
  110. package/dist/entities/drive/attached_object.entity.js +154 -0
  111. package/dist/entities/drive/attached_object.entity.js.map +1 -0
  112. package/dist/entities/drive/file.entity.d.ts +19 -0
  113. package/dist/entities/drive/file.entity.js +130 -0
  114. package/dist/entities/drive/file.entity.js.map +1 -0
  115. package/dist/entities/drive/folder.entity.d.ts +18 -0
  116. package/dist/entities/drive/folder.entity.js +137 -0
  117. package/dist/entities/drive/folder.entity.js.map +1 -0
  118. package/dist/entities/drive/index.d.ts +3 -0
  119. package/dist/entities/drive/index.js +20 -0
  120. package/dist/entities/drive/index.js.map +1 -0
  121. package/dist/entities/easyapp/filter-view.entity.d.ts +7 -0
  122. package/dist/entities/easyapp/filter-view.entity.js +41 -0
  123. package/dist/entities/easyapp/filter-view.entity.js.map +1 -0
  124. package/dist/entities/email.entity.d.ts +5 -0
  125. package/dist/entities/email.entity.js +36 -0
  126. package/dist/entities/email.entity.js.map +1 -0
  127. package/dist/entities/group.entity.d.ts +5 -0
  128. package/dist/entities/group.entity.js +33 -0
  129. package/dist/entities/group.entity.js.map +1 -0
  130. package/dist/entities/helpers/entity_file.entity.d.ts +10 -0
  131. package/dist/entities/helpers/entity_file.entity.js +61 -0
  132. package/dist/entities/helpers/entity_file.entity.js.map +1 -0
  133. package/dist/entities/helpers/entity_folder.entity.d.ts +10 -0
  134. package/dist/entities/helpers/entity_folder.entity.js +61 -0
  135. package/dist/entities/helpers/entity_folder.entity.js.map +1 -0
  136. package/dist/entities/helpers/index.d.ts +4 -0
  137. package/dist/entities/helpers/index.js +21 -0
  138. package/dist/entities/helpers/index.js.map +1 -0
  139. package/dist/entities/helpers/sales/common/client_sources.entity.d.ts +5 -0
  140. package/dist/entities/helpers/sales/common/client_sources.entity.js +36 -0
  141. package/dist/entities/helpers/sales/common/client_sources.entity.js.map +1 -0
  142. package/dist/entities/helpers/sales/common/client_types.entity.d.ts +5 -0
  143. package/dist/entities/helpers/sales/common/client_types.entity.js +36 -0
  144. package/dist/entities/helpers/sales/common/client_types.entity.js.map +1 -0
  145. package/dist/entities/helpers/sales/contact/contact_email.entity.d.ts +11 -0
  146. package/dist/entities/helpers/sales/contact/contact_email.entity.js +68 -0
  147. package/dist/entities/helpers/sales/contact/contact_email.entity.js.map +1 -0
  148. package/dist/entities/helpers/sales/contact/contact_insurance.entity.d.ts +11 -0
  149. package/dist/entities/helpers/sales/contact/contact_insurance.entity.js +68 -0
  150. package/dist/entities/helpers/sales/contact/contact_insurance.entity.js.map +1 -0
  151. package/dist/entities/helpers/sales/contact/contact_phone.entity.d.ts +11 -0
  152. package/dist/entities/helpers/sales/contact/contact_phone.entity.js +68 -0
  153. package/dist/entities/helpers/sales/contact/contact_phone.entity.js.map +1 -0
  154. package/dist/entities/helpers/sales/contact/index.d.ts +5 -0
  155. package/dist/entities/helpers/sales/contact/index.js +22 -0
  156. package/dist/entities/helpers/sales/contact/index.js.map +1 -0
  157. package/dist/entities/helpers/sales/index.d.ts +6 -0
  158. package/dist/entities/helpers/sales/index.js +23 -0
  159. package/dist/entities/helpers/sales/index.js.map +1 -0
  160. package/dist/entities/helpers/sales/lead/h_lead_source.entity.d.ts +4 -0
  161. package/dist/entities/helpers/sales/lead/h_lead_source.entity.js +30 -0
  162. package/dist/entities/helpers/sales/lead/h_lead_source.entity.js.map +1 -0
  163. package/dist/entities/helpers/sales/lead/h_lead_stage.entity.d.ts +5 -0
  164. package/dist/entities/helpers/sales/lead/h_lead_stage.entity.js +36 -0
  165. package/dist/entities/helpers/sales/lead/h_lead_stage.entity.js.map +1 -0
  166. package/dist/entities/helpers/sales/lead/h_lead_types.entity.d.ts +4 -0
  167. package/dist/entities/helpers/sales/lead/h_lead_types.entity.js +30 -0
  168. package/dist/entities/helpers/sales/lead/h_lead_types.entity.js.map +1 -0
  169. package/dist/entities/helpers/sales/lead/index.d.ts +6 -0
  170. package/dist/entities/helpers/sales/lead/index.js +23 -0
  171. package/dist/entities/helpers/sales/lead/index.js.map +1 -0
  172. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.d.ts +4 -0
  173. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.js +28 -0
  174. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.js.map +1 -0
  175. package/dist/entities/helpers/sales/lead/lead_email.entity.d.ts +11 -0
  176. package/dist/entities/helpers/sales/lead/lead_email.entity.js +66 -0
  177. package/dist/entities/helpers/sales/lead/lead_email.entity.js.map +1 -0
  178. package/dist/entities/helpers/sales/lead/lead_phone.entity.d.ts +11 -0
  179. package/dist/entities/helpers/sales/lead/lead_phone.entity.js +66 -0
  180. package/dist/entities/helpers/sales/lead/lead_phone.entity.js.map +1 -0
  181. package/dist/entities/helpers/sales/poliza/h_poliza_category.entity.d.ts +5 -0
  182. package/dist/entities/helpers/sales/poliza/h_poliza_category.entity.js +30 -0
  183. package/dist/entities/helpers/sales/poliza/h_poliza_category.entity.js.map +1 -0
  184. package/dist/entities/helpers/sales/poliza/h_poliza_conducto_pago.entity.d.ts +5 -0
  185. package/dist/entities/helpers/sales/poliza/h_poliza_conducto_pago.entity.js +33 -0
  186. package/dist/entities/helpers/sales/poliza/h_poliza_conducto_pago.entity.js.map +1 -0
  187. package/dist/entities/helpers/sales/poliza/h_poliza_forma_cobro.entity.d.ts +6 -0
  188. package/dist/entities/helpers/sales/poliza/h_poliza_forma_cobro.entity.js +39 -0
  189. package/dist/entities/helpers/sales/poliza/h_poliza_forma_cobro.entity.js.map +1 -0
  190. package/dist/entities/helpers/sales/poliza/h_poliza_frecuencia_pago.entity.d.ts +6 -0
  191. package/dist/entities/helpers/sales/poliza/h_poliza_frecuencia_pago.entity.js +39 -0
  192. package/dist/entities/helpers/sales/poliza/h_poliza_frecuencia_pago.entity.js.map +1 -0
  193. package/dist/entities/helpers/sales/poliza/h_poliza_insurance.entity.d.ts +5 -0
  194. package/dist/entities/helpers/sales/poliza/h_poliza_insurance.entity.js +30 -0
  195. package/dist/entities/helpers/sales/poliza/h_poliza_insurance.entity.js.map +1 -0
  196. package/dist/entities/helpers/sales/poliza/h_poliza_subramo.entity.d.ts +6 -0
  197. package/dist/entities/helpers/sales/poliza/h_poliza_subramo.entity.js +36 -0
  198. package/dist/entities/helpers/sales/poliza/h_poliza_subramo.entity.js.map +1 -0
  199. package/dist/entities/helpers/sales/poliza/h_poliza_type.entity.d.ts +5 -0
  200. package/dist/entities/helpers/sales/poliza/h_poliza_type.entity.js +33 -0
  201. package/dist/entities/helpers/sales/poliza/h_poliza_type.entity.js.map +1 -0
  202. package/dist/entities/helpers/sales/poliza/h_receipt_stage.entity.d.ts +8 -0
  203. package/dist/entities/helpers/sales/poliza/h_receipt_stage.entity.js +53 -0
  204. package/dist/entities/helpers/sales/poliza/h_receipt_stage.entity.js.map +1 -0
  205. package/dist/entities/helpers/sales/poliza/index.d.ts +10 -0
  206. package/dist/entities/helpers/sales/poliza/index.js +27 -0
  207. package/dist/entities/helpers/sales/poliza/index.js.map +1 -0
  208. package/dist/entities/helpers/sales/poliza/poliza_file.entity.d.ts +11 -0
  209. package/dist/entities/helpers/sales/poliza/poliza_file.entity.js +68 -0
  210. package/dist/entities/helpers/sales/poliza/poliza_file.entity.js.map +1 -0
  211. package/dist/entities/helpers/sales/poliza/poliza_insured.entity.d.ts +11 -0
  212. package/dist/entities/helpers/sales/poliza/poliza_insured.entity.js +86 -0
  213. package/dist/entities/helpers/sales/poliza/poliza_insured.entity.js.map +1 -0
  214. package/dist/entities/helpers/tools/index.d.ts +1 -0
  215. package/dist/entities/helpers/tools/index.js +18 -0
  216. package/dist/entities/helpers/tools/index.js.map +1 -0
  217. package/dist/entities/helpers/tools/task_crm.entity.d.ts +19 -0
  218. package/dist/entities/helpers/tools/task_crm.entity.js +136 -0
  219. package/dist/entities/helpers/tools/task_crm.entity.js.map +1 -0
  220. package/dist/entities/helpers/user/access_history.entity.d.ts +9 -0
  221. package/dist/entities/helpers/user/access_history.entity.js +58 -0
  222. package/dist/entities/helpers/user/access_history.entity.js.map +1 -0
  223. package/dist/entities/imap-config.entity.d.ts +11 -0
  224. package/dist/entities/imap-config.entity.js +61 -0
  225. package/dist/entities/imap-config.entity.js.map +1 -0
  226. package/dist/entities/index.d.ts +26 -0
  227. package/dist/entities/index.js +43 -0
  228. package/dist/entities/index.js.map +1 -0
  229. package/dist/entities/menu-permissions.entity.d.ts +7 -0
  230. package/dist/entities/menu-permissions.entity.js +42 -0
  231. package/dist/entities/menu-permissions.entity.js.map +1 -0
  232. package/dist/entities/notifications/index.d.ts +2 -0
  233. package/dist/entities/notifications/index.js +19 -0
  234. package/dist/entities/notifications/index.js.map +1 -0
  235. package/dist/entities/notifications/notification.entity.d.ts +15 -0
  236. package/dist/entities/notifications/notification.entity.js +119 -0
  237. package/dist/entities/notifications/notification.entity.js.map +1 -0
  238. package/dist/entities/notifications/push-token.entity.d.ts +7 -0
  239. package/dist/entities/notifications/push-token.entity.js +45 -0
  240. package/dist/entities/notifications/push-token.entity.js.map +1 -0
  241. package/dist/entities/otp-log.entity.d.ts +8 -0
  242. package/dist/entities/otp-log.entity.js +49 -0
  243. package/dist/entities/otp-log.entity.js.map +1 -0
  244. package/dist/entities/permission.entity.d.ts +7 -0
  245. package/dist/entities/permission.entity.js +46 -0
  246. package/dist/entities/permission.entity.js.map +1 -0
  247. package/dist/entities/phone.entity.d.ts +5 -0
  248. package/dist/entities/phone.entity.js +36 -0
  249. package/dist/entities/phone.entity.js.map +1 -0
  250. package/dist/entities/profile.entity.d.ts +9 -0
  251. package/dist/entities/profile.entity.js +56 -0
  252. package/dist/entities/profile.entity.js.map +1 -0
  253. package/dist/entities/protocol.entity.d.ts +8 -0
  254. package/dist/entities/protocol.entity.js +46 -0
  255. package/dist/entities/protocol.entity.js.map +1 -0
  256. package/dist/entities/refresh-token.entity.d.ts +8 -0
  257. package/dist/entities/refresh-token.entity.js +46 -0
  258. package/dist/entities/refresh-token.entity.js.map +1 -0
  259. package/dist/entities/role.entity.d.ts +6 -0
  260. package/dist/entities/role.entity.js +42 -0
  261. package/dist/entities/role.entity.js.map +1 -0
  262. package/dist/entities/sales/agente-intermediario.entity.d.ts +5 -0
  263. package/dist/entities/sales/agente-intermediario.entity.js +34 -0
  264. package/dist/entities/sales/agente-intermediario.entity.js.map +1 -0
  265. package/dist/entities/sales/beneficiarios/index.d.ts +2 -0
  266. package/dist/entities/sales/beneficiarios/index.js +19 -0
  267. package/dist/entities/sales/beneficiarios/index.js.map +1 -0
  268. package/dist/entities/sales/beneficiarios/person.entity.d.ts +10 -0
  269. package/dist/entities/sales/beneficiarios/person.entity.js +89 -0
  270. package/dist/entities/sales/beneficiarios/person.entity.js.map +1 -0
  271. package/dist/entities/sales/beneficiarios/vehicle.entity.d.ts +16 -0
  272. package/dist/entities/sales/beneficiarios/vehicle.entity.js +106 -0
  273. package/dist/entities/sales/beneficiarios/vehicle.entity.js.map +1 -0
  274. package/dist/entities/sales/contact-comment.entity.d.ts +5 -0
  275. package/dist/entities/sales/contact-comment.entity.js +32 -0
  276. package/dist/entities/sales/contact-comment.entity.js.map +1 -0
  277. package/dist/entities/sales/contact.entity.d.ts +49 -0
  278. package/dist/entities/sales/contact.entity.js +303 -0
  279. package/dist/entities/sales/contact.entity.js.map +1 -0
  280. package/dist/entities/sales/index.d.ts +12 -0
  281. package/dist/entities/sales/index.js +29 -0
  282. package/dist/entities/sales/index.js.map +1 -0
  283. package/dist/entities/sales/lead-comment.entity.d.ts +5 -0
  284. package/dist/entities/sales/lead-comment.entity.js +32 -0
  285. package/dist/entities/sales/lead-comment.entity.js.map +1 -0
  286. package/dist/entities/sales/lead.entity.d.ts +51 -0
  287. package/dist/entities/sales/lead.entity.js +344 -0
  288. package/dist/entities/sales/lead.entity.js.map +1 -0
  289. package/dist/entities/sales/poliza-comment.entity.d.ts +5 -0
  290. package/dist/entities/sales/poliza-comment.entity.js +32 -0
  291. package/dist/entities/sales/poliza-comment.entity.js.map +1 -0
  292. package/dist/entities/sales/poliza.entity.d.ts +112 -0
  293. package/dist/entities/sales/poliza.entity.js +1103 -0
  294. package/dist/entities/sales/poliza.entity.js.map +1 -0
  295. package/dist/entities/sales/poliza_siniestro.entity.d.ts +12 -0
  296. package/dist/entities/sales/poliza_siniestro.entity.js +72 -0
  297. package/dist/entities/sales/poliza_siniestro.entity.js.map +1 -0
  298. package/dist/entities/sales/receipt-comment.entity.d.ts +5 -0
  299. package/dist/entities/sales/receipt-comment.entity.js +32 -0
  300. package/dist/entities/sales/receipt-comment.entity.js.map +1 -0
  301. package/dist/entities/sales/receipt-sub-agente.entity.d.ts +5 -0
  302. package/dist/entities/sales/receipt-sub-agente.entity.js +35 -0
  303. package/dist/entities/sales/receipt-sub-agente.entity.js.map +1 -0
  304. package/dist/entities/sales/receipt.entity.d.ts +31 -0
  305. package/dist/entities/sales/receipt.entity.js +203 -0
  306. package/dist/entities/sales/receipt.entity.js.map +1 -0
  307. package/dist/entities/tag.entity.d.ts +8 -0
  308. package/dist/entities/tag.entity.js +53 -0
  309. package/dist/entities/tag.entity.js.map +1 -0
  310. package/dist/entities/thirdparty/email-config.entity.d.ts +14 -0
  311. package/dist/entities/thirdparty/email-config.entity.js +76 -0
  312. package/dist/entities/thirdparty/email-config.entity.js.map +1 -0
  313. package/dist/entities/thirdparty/email.entity.d.ts +17 -0
  314. package/dist/entities/thirdparty/email.entity.js +79 -0
  315. package/dist/entities/thirdparty/email.entity.js.map +1 -0
  316. package/dist/entities/thirdparty/oauth.entity.d.ts +18 -0
  317. package/dist/entities/thirdparty/oauth.entity.js +93 -0
  318. package/dist/entities/thirdparty/oauth.entity.js.map +1 -0
  319. package/dist/entities/thirdparty/service.entity.d.ts +6 -0
  320. package/dist/entities/thirdparty/service.entity.js +32 -0
  321. package/dist/entities/thirdparty/service.entity.js.map +1 -0
  322. package/dist/entities/thirdparty/user-email-relation.entity.d.ts +7 -0
  323. package/dist/entities/thirdparty/user-email-relation.entity.js +35 -0
  324. package/dist/entities/thirdparty/user-email-relation.entity.js.map +1 -0
  325. package/dist/entities/tools/calendar/event.entity.d.ts +19 -0
  326. package/dist/entities/tools/calendar/event.entity.js +132 -0
  327. package/dist/entities/tools/calendar/event.entity.js.map +1 -0
  328. package/dist/entities/tools/calendar/index.d.ts +1 -0
  329. package/dist/entities/tools/calendar/index.js +18 -0
  330. package/dist/entities/tools/calendar/index.js.map +1 -0
  331. package/dist/entities/tools/index.d.ts +4 -0
  332. package/dist/entities/tools/index.js +21 -0
  333. package/dist/entities/tools/index.js.map +1 -0
  334. package/dist/entities/tools/task-comment.entity.d.ts +6 -0
  335. package/dist/entities/tools/task-comment.entity.js +38 -0
  336. package/dist/entities/tools/task-comment.entity.js.map +1 -0
  337. package/dist/entities/tools/task-list-field.d.ts +5 -0
  338. package/dist/entities/tools/task-list-field.js +39 -0
  339. package/dist/entities/tools/task-list-field.js.map +1 -0
  340. package/dist/entities/tools/task.entity.d.ts +34 -0
  341. package/dist/entities/tools/task.entity.js +221 -0
  342. package/dist/entities/tools/task.entity.js.map +1 -0
  343. package/dist/entities/user.entity.d.ts +29 -0
  344. package/dist/entities/user.entity.js +168 -0
  345. package/dist/entities/user.entity.js.map +1 -0
  346. package/dist/eslint.config.d.ts +2 -0
  347. package/dist/eslint.config.js +46 -0
  348. package/dist/eslint.config.js.map +1 -0
  349. package/dist/grpc/drive/drive.proto +179 -0
  350. package/dist/index.d.ts +3 -0
  351. package/dist/index.js +20 -0
  352. package/dist/index.js.map +1 -0
  353. package/dist/modules/index.d.ts +4 -0
  354. package/dist/modules/index.js +21 -0
  355. package/dist/modules/index.js.map +1 -0
  356. package/dist/modules/queue/event.service.d.ts +9 -0
  357. package/dist/modules/queue/event.service.js +40 -0
  358. package/dist/modules/queue/event.service.js.map +1 -0
  359. package/dist/modules/queue/notifier.service.d.ts +15 -0
  360. package/dist/modules/queue/notifier.service.js +70 -0
  361. package/dist/modules/queue/notifier.service.js.map +1 -0
  362. package/dist/modules/queue/notifiers/calendar.notifier.d.ts +2 -0
  363. package/dist/modules/queue/notifiers/calendar.notifier.js +17 -0
  364. package/dist/modules/queue/notifiers/calendar.notifier.js.map +1 -0
  365. package/dist/modules/queue/notifiers/contact.notifier.d.ts +7 -0
  366. package/dist/modules/queue/notifiers/contact.notifier.js +49 -0
  367. package/dist/modules/queue/notifiers/contact.notifier.js.map +1 -0
  368. package/dist/modules/queue/notifiers/index.d.ts +4 -0
  369. package/dist/modules/queue/notifiers/index.js +21 -0
  370. package/dist/modules/queue/notifiers/index.js.map +1 -0
  371. package/dist/modules/queue/notifiers/lead.notifier.d.ts +7 -0
  372. package/dist/modules/queue/notifiers/lead.notifier.js +49 -0
  373. package/dist/modules/queue/notifiers/lead.notifier.js.map +1 -0
  374. package/dist/modules/queue/notifiers/task.notifier.d.ts +15 -0
  375. package/dist/modules/queue/notifiers/task.notifier.js +130 -0
  376. package/dist/modules/queue/notifiers/task.notifier.js.map +1 -0
  377. package/dist/modules/queue/queue.module.d.ts +4 -0
  378. package/dist/modules/queue/queue.module.js +57 -0
  379. package/dist/modules/queue/queue.module.js.map +1 -0
  380. package/dist/modules/queue/scheduler.service.d.ts +9 -0
  381. package/dist/modules/queue/scheduler.service.js +40 -0
  382. package/dist/modules/queue/scheduler.service.js.map +1 -0
  383. package/justfile +8 -8
  384. package/package.json +1 -1
  385. package/scripts/bump.sh +5 -5
  386. package/test.bat +15 -15
  387. package/tsconfig.build.json +4 -4
  388. package/tsconfig.json +25 -25
  389. package/tsconfig.tsbuildinfo +1 -0
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.TaskNotifier = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const notifier_service_1 = require("../notifier.service");
15
+ const common_2 = require("../../../common");
16
+ let TaskNotifier = class TaskNotifier {
17
+ notifierService;
18
+ constructor(notifierService) {
19
+ this.notifierService = notifierService;
20
+ }
21
+ getMetadata(task, additionalData) {
22
+ return {
23
+ taskId: task.id,
24
+ taskOwnerId: task.createdBy?.id ?? null,
25
+ taskResponsibleId: task.responsible?.[0]?.id ?? null,
26
+ ...(additionalData ?? {}),
27
+ };
28
+ }
29
+ createNotificationDto(title, content, recipientsId, task, channels, subCategory, metadata) {
30
+ return {
31
+ title,
32
+ content,
33
+ recipientsId,
34
+ entityId: task.id,
35
+ channels,
36
+ category: common_2.NotificationCategory.TASK,
37
+ subCategory,
38
+ metadata: this.getMetadata(task, metadata),
39
+ };
40
+ }
41
+ buildTaskLink(task, color = 'blue') {
42
+ return `<a href="/tools/tasks/task/${task.id}?show=true" style="color:${color}">[${task.name}]</a>`;
43
+ }
44
+ async notifyTaskCompletion(task, recipientsId) {
45
+ const content = `La tarea ${task.name} ha sido completada`;
46
+ const notificationDto = this.createNotificationDto('Tarea Completada', content, recipientsId, task, [common_2.NotificationChannel.APP], common_2.NotificationSubcategory.TASK_COMPLETED);
47
+ await this.notifierService.sendNotification(notificationDto);
48
+ }
49
+ async notifyTaskOverdue(task, recipientsId) {
50
+ const content = `La tarea [#${task.number}] - ${task.name} está atrasada`;
51
+ const notificationDto = this.createNotificationDto('Tarea Atrasada', content, recipientsId, task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.TASK_OVERDUE);
52
+ await this.notifierService.sendNotification(notificationDto);
53
+ }
54
+ async notifyTaskContinue(task, recipientsId) {
55
+ const content = `La tarea #${task.number} - ${task.name} ha sido reanudada`;
56
+ const notificationDto = this.createNotificationDto('Tarea Reanudada', content, recipientsId, task, [common_2.NotificationChannel.APP], common_2.NotificationSubcategory.TASK_UPDATED);
57
+ await this.notifierService.sendNotification(notificationDto);
58
+ }
59
+ async notifyNewTask(task, recipientsId) {
60
+ const fechaLimite = task.deadline
61
+ ? `<br/>Fecha Límite: ${new Date(task.deadline).toLocaleDateString()}`
62
+ : '';
63
+ const observadores = task.observers?.length > 0
64
+ ? `<br/>Observadores: ${task.observers.map((o) => o.username).join(', ')}`
65
+ : '';
66
+ const responsables = task.responsible?.length > 0
67
+ ? `<br/>Responsables: ${task.responsible.map((r) => r.username).join(', ')}`
68
+ : '';
69
+ const participantes = task.participants?.length > 0
70
+ ? `<br/>Participantes: ${task.participants.map((p) => p.username).join(', ')}`
71
+ : '';
72
+ const taskLink = this.buildTaskLink(task);
73
+ const content = `Nueva tarea agregada: ${taskLink}${responsables}${observadores}${participantes}${fechaLimite}`;
74
+ const notificationDto = this.createNotificationDto('Nueva Tarea', content, recipientsId, task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.NEW_TASK);
75
+ await this.notifierService.sendNotification(notificationDto);
76
+ }
77
+ async notifyTaskUpdate(task, recipientsId, changedFields) {
78
+ const taskLink = this.buildTaskLink(task);
79
+ let content = `Tarea #${task.number} - ${taskLink}`;
80
+ if (changedFields.length === 0) {
81
+ content += ' ha sido actualizada';
82
+ const notificationDto = this.createNotificationDto('Tarea Actualizada', content, recipientsId, task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.TASK_UPDATED);
83
+ await this.notifierService.sendNotification(notificationDto);
84
+ return;
85
+ }
86
+ content += ' se actualizó:';
87
+ if (changedFields.includes('deadline')) {
88
+ const deadlineText = task.deadline
89
+ ? new Date(task.deadline).toLocaleDateString()
90
+ : 'Ninguna';
91
+ content += `<br/>Fecha Límite cambiada: ${deadlineText}`;
92
+ }
93
+ if (changedFields.includes('responsible') && task.responsible?.length > 0) {
94
+ content = `Se te ha asignado la tarea #${task.number} - ${taskLink}`;
95
+ const notificationDto = this.createNotificationDto('Tarea Asignada', content, [task.responsible[0].id], task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.TASK_UPDATED);
96
+ await this.notifierService.sendNotification(notificationDto);
97
+ }
98
+ else {
99
+ if (changedFields.includes('name')) {
100
+ content += `<br/>Nombre: ${task.name}`;
101
+ }
102
+ if (changedFields.includes('description')) {
103
+ content += `<br/>Descripción: ${task.description}`;
104
+ }
105
+ if (changedFields.includes('status')) {
106
+ content += `<br/>Estado: ${task.status}`;
107
+ }
108
+ const notificationDto = this.createNotificationDto('Tarea Actualizada', content, recipientsId, task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.TASK_UPDATED);
109
+ await this.notifierService.sendNotification(notificationDto);
110
+ }
111
+ }
112
+ async notifyNewComment(task, comment, recipientsId) {
113
+ const commentText = comment.comment.slice(0, 20);
114
+ const taskLink = this.buildTaskLink(task, '#170f6b');
115
+ const commenterName = comment.createdBy?.name ?? 'Alguien';
116
+ const content = `${commenterName} comentó en la tarea: ${taskLink}. Texto del comentario: ${commentText}`;
117
+ const metadata = this.getMetadata(task, {
118
+ commentId: comment.id,
119
+ commentOwnerId: comment.createdBy?.id ?? null,
120
+ });
121
+ const notificationDto = this.createNotificationDto('Nuevo Comentario', content, recipientsId, task, [common_2.NotificationChannel.APP, common_2.NotificationChannel.SMS, common_2.NotificationChannel.PUSH], common_2.NotificationSubcategory.TASK_NEW_COMMENT, metadata);
122
+ await this.notifierService.sendNotification(notificationDto);
123
+ }
124
+ };
125
+ exports.TaskNotifier = TaskNotifier;
126
+ exports.TaskNotifier = TaskNotifier = __decorate([
127
+ (0, common_1.Injectable)(),
128
+ __metadata("design:paramtypes", [notifier_service_1.EasyNotifierService])
129
+ ], TaskNotifier);
130
+ //# sourceMappingURL=task.notifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task.notifier.js","sourceRoot":"","sources":["../../../../src/modules/queue/notifiers/task.notifier.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,0DAA0D;AAC1D,4CAKyB;AAIlB,IAAM,YAAY,GAAlB,MAAM,YAAY;IACQ;IAA7B,YAA6B,eAAoC;QAApC,oBAAe,GAAf,eAAe,CAAqB;IAAI,CAAC;IAE9D,WAAW,CAAC,IAAU,EAAE,cAAoC;QAChE,OAAO;YACH,MAAM,EAAE,IAAI,CAAC,EAAE;YACf,WAAW,EAAE,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,IAAI;YACvC,iBAAiB,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,IAAI;YACpD,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC;SAC5B,CAAC;IACN,CAAC;IAEO,qBAAqB,CACzB,KAAa,EACb,OAAe,EACf,YAAsB,EACtB,IAAU,EACV,QAA+B,EAC/B,WAAoC,EACpC,QAA8B;QAE9B,OAAO;YACH,KAAK;YACL,OAAO;YACP,YAAY;YACZ,QAAQ,EAAE,IAAI,CAAC,EAAE;YACjB,QAAQ;YACR,QAAQ,EAAE,6BAAoB,CAAC,IAAI;YACnC,WAAW;YACX,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC;SAC7C,CAAC;IACN,CAAC;IAEO,aAAa,CAAC,IAAU,EAAE,QAAgB,MAAM;QACpD,OAAO,8BAA8B,IAAI,CAAC,EAAE,4BAA4B,KAAK,MAAM,IAAI,CAAC,IAAI,OAAO,CAAC;IACxG,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,IAAU,EAAE,YAAsB;QACzD,MAAM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M,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACrD,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE,IAAI,IAAI,SAAS,CAAC;QAC3D,MAAM,OAAO,GAAG,GAAG,aAAa,yBAAyB,QAAQ,2BAA2B,WAAW,EAAE,CAAC;QAE1G,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;YACpC,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,cAAc,EAAE,OAAO,CAAC,SAAS,EAAE,EAAE,IAAI,IAAI;SAChD,CAAC,CAAC;QAEH,MAAM,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAC9C,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,IAAI,EACJ,CAAC,4BAAmB,CAAC,GAAG,EAAE,4BAAmB,CAAC,GAAG,EAAE,4BAAmB,CAAC,IAAI,CAAC,EAC5E,gCAAuB,CAAC,gBAAgB,EACxC,QAAQ,CACX,CAAC;QAEF,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACjE,CAAC;CACJ,CAAA;AA/LY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEqC,sCAAmB;GADxD,YAAY,CA+LxB"}
@@ -0,0 +1,4 @@
1
+ import { DynamicModule } from "@nestjs/common";
2
+ export declare class EasyQueueModule {
3
+ static register(exchangeName: string, rabbitMQUri: string, notificationRoutingKey: string, schedulerRoutingKey: string): DynamicModule;
4
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var EasyQueueModule_1;
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.EasyQueueModule = void 0;
11
+ const common_1 = require("@nestjs/common");
12
+ const notifier_service_1 = require("./notifier.service");
13
+ const nestjs_rabbitmq_1 = require("@golevelup/nestjs-rabbitmq");
14
+ const scheduler_service_1 = require("./scheduler.service");
15
+ const event_service_1 = require("./event.service");
16
+ let EasyQueueModule = EasyQueueModule_1 = class EasyQueueModule {
17
+ static register(exchangeName, rabbitMQUri, notificationRoutingKey, schedulerRoutingKey) {
18
+ return {
19
+ module: EasyQueueModule_1,
20
+ imports: [
21
+ nestjs_rabbitmq_1.RabbitMQModule.forRoot(nestjs_rabbitmq_1.RabbitMQModule, {
22
+ exchanges: [
23
+ {
24
+ name: exchangeName,
25
+ type: "topic",
26
+ },
27
+ ],
28
+ uri: rabbitMQUri,
29
+ }),
30
+ ],
31
+ providers: [
32
+ {
33
+ provide: "EXCHANGE_NAME",
34
+ useValue: exchangeName,
35
+ },
36
+ {
37
+ provide: "NOTIFIER_ROUTING_KEY",
38
+ useValue: notificationRoutingKey,
39
+ },
40
+ {
41
+ provide: "SCHEDULER_ROUTING_KEY",
42
+ useValue: schedulerRoutingKey,
43
+ },
44
+ notifier_service_1.EasyNotifierService,
45
+ scheduler_service_1.EasySchedulerService,
46
+ event_service_1.EasyEventService,
47
+ ],
48
+ exports: [notifier_service_1.EasyNotifierService, scheduler_service_1.EasySchedulerService, event_service_1.EasyEventService],
49
+ };
50
+ }
51
+ };
52
+ exports.EasyQueueModule = EasyQueueModule;
53
+ exports.EasyQueueModule = EasyQueueModule = EasyQueueModule_1 = __decorate([
54
+ (0, common_1.Global)(),
55
+ (0, common_1.Module)({})
56
+ ], EasyQueueModule);
57
+ //# sourceMappingURL=queue.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue.module.js","sourceRoot":"","sources":["../../../src/modules/queue/queue.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,yDAAyD;AACzD,gEAA4D;AAC5D,2DAA2D;AAC3D,mDAAmD;AAI5C,IAAM,eAAe,uBAArB,MAAM,eAAe;IAC1B,MAAM,CAAC,QAAQ,CACb,YAAoB,EACpB,WAAmB,EACnB,sBAA8B,EAC9B,mBAA2B;QAE3B,OAAO;YACL,MAAM,EAAE,iBAAe;YACvB,OAAO,EAAE;gBACP,gCAAc,CAAC,OAAO,CAAC,gCAAc,EAAE;oBACrC,SAAS,EAAE;wBACT;4BACE,IAAI,EAAE,YAAY;4BAClB,IAAI,EAAE,OAAO;yBACd;qBACF;oBACD,GAAG,EAAE,WAAW;iBACjB,CAAC;aACH;YACD,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,eAAe;oBACxB,QAAQ,EAAE,YAAY;iBACvB;gBACD;oBACE,OAAO,EAAE,sBAAsB;oBAC/B,QAAQ,EAAE,sBAAsB;iBACjC;gBACD;oBACE,OAAO,EAAE,uBAAuB;oBAChC,QAAQ,EAAE,mBAAmB;iBAC9B;gBACD,sCAAmB;gBACnB,wCAAoB;gBACpB,gCAAgB;aACjB;YACD,OAAO,EAAE,CAAC,sCAAmB,EAAE,wCAAoB,EAAE,gCAAgB,CAAC;SACvE,CAAC;IACJ,CAAC;CACF,CAAA;AAxCY,0CAAe;0BAAf,eAAe;IAF3B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,eAAe,CAwC3B"}
@@ -0,0 +1,9 @@
1
+ import { AmqpConnection } from "@golevelup/nestjs-rabbitmq";
2
+ import { Task } from "../../entities";
3
+ export declare class EasySchedulerService {
4
+ private readonly amqpConnection;
5
+ private readonly exchangeName;
6
+ private readonly routingKey;
7
+ constructor(amqpConnection: AmqpConnection, exchangeName: string, routingKey: string);
8
+ scheduleTaskAlerts(task: Task): Promise<void>;
9
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.EasySchedulerService = void 0;
16
+ const nestjs_rabbitmq_1 = require("@golevelup/nestjs-rabbitmq");
17
+ const common_1 = require("@nestjs/common");
18
+ const logger = new common_1.Logger("EasySchedulerService");
19
+ let EasySchedulerService = class EasySchedulerService {
20
+ amqpConnection;
21
+ exchangeName;
22
+ routingKey;
23
+ constructor(amqpConnection, exchangeName, routingKey) {
24
+ this.amqpConnection = amqpConnection;
25
+ this.exchangeName = exchangeName;
26
+ this.routingKey = routingKey;
27
+ }
28
+ async scheduleTaskAlerts(task) {
29
+ logger.debug(`Add Task schedule Service...`);
30
+ await this.amqpConnection.publish(this.exchangeName, this.routingKey, task);
31
+ }
32
+ };
33
+ exports.EasySchedulerService = EasySchedulerService;
34
+ exports.EasySchedulerService = EasySchedulerService = __decorate([
35
+ (0, common_1.Injectable)(),
36
+ __param(1, (0, common_1.Inject)('EXCHANGE_NAME')),
37
+ __param(2, (0, common_1.Inject)('SCHEDULER_ROUTING_KEY')),
38
+ __metadata("design:paramtypes", [nestjs_rabbitmq_1.AmqpConnection, String, String])
39
+ ], EasySchedulerService);
40
+ //# sourceMappingURL=scheduler.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduler.service.js","sourceRoot":"","sources":["../../../src/modules/queue/scheduler.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAA4D;AAC5D,2CAA4D;AAG5D,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAsB,CAAC,CAAC;AAG3C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAER;IACyB;IACQ;IAHtD,YACqB,cAA8B,EACL,YAAoB,EACZ,UAAkB;QAFnD,mBAAc,GAAd,cAAc,CAAgB;QACL,iBAAY,GAAZ,YAAY,CAAQ;QACZ,eAAU,GAAV,UAAU,CAAQ;IACpE,CAAC;IAEL,KAAK,CAAC,kBAAkB,CAAC,IAAU;QACjC,MAAM,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAC7C,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC9E,CAAC;CAEJ,CAAA;AAZY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAIJ,WAAA,IAAA,eAAM,EAAC,eAAe,CAAC,CAAA;IACvB,WAAA,IAAA,eAAM,EAAC,uBAAuB,CAAC,CAAA;qCAFC,gCAAc;GAF1C,oBAAoB,CAYhC"}
package/justfile CHANGED
@@ -1,8 +1,8 @@
1
-
2
- # prints all available commands
3
- default:
4
- just --list
5
-
6
- # Upgrade and publish
7
- bump:
8
- pnpm bump
1
+
2
+ # prints all available commands
3
+ default:
4
+ just --list
5
+
6
+ # Upgrade and publish
7
+ bump:
8
+ pnpm bump
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easywork-common-lib",
3
- "version": "1.0.463",
3
+ "version": "1.0.466",
4
4
  "description": "Librería común de Easywork",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/scripts/bump.sh CHANGED
@@ -1,6 +1,6 @@
1
- git add .
2
- git commit -m "bump version"
3
- npm version patch
4
- npm run build
5
- npm publish
1
+ git add .
2
+ git commit -m "bump version"
3
+ npm version patch
4
+ npm run build
5
+ npm publish
6
6
  git push
package/test.bat CHANGED
@@ -1,16 +1,16 @@
1
- @echo off
2
- setlocal enabledelayedexpansion
3
-
4
- rem Define the root directory
5
- set "root=C:\Users\ROSME\Documents\GitHub\easywork-common-lib"
6
-
7
- rem Iterate through all directories and subdirectories
8
- for /f "delims=" %%d in ('dir "%root%" /ad /b /s') do (
9
- rem Check if the directory name contains node_modules
10
- echo %%d | findstr /i /c:"\node_modules" >nul
11
- echo %%d | findstr /i /c:"\.git" >nul
12
- if errorlevel 1 (
13
- rem If not, list the directory contents
14
- dir "%%d"
15
- )
1
+ @echo off
2
+ setlocal enabledelayedexpansion
3
+
4
+ rem Define the root directory
5
+ set "root=C:\Users\ROSME\Documents\GitHub\easywork-common-lib"
6
+
7
+ rem Iterate through all directories and subdirectories
8
+ for /f "delims=" %%d in ('dir "%root%" /ad /b /s') do (
9
+ rem Check if the directory name contains node_modules
10
+ echo %%d | findstr /i /c:"\node_modules" >nul
11
+ echo %%d | findstr /i /c:"\.git" >nul
12
+ if errorlevel 1 (
13
+ rem If not, list the directory contents
14
+ dir "%%d"
15
+ )
16
16
  )
@@ -1,4 +1,4 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "exclude": ["node_modules", "test", "dist", "**/*spec.ts", "eslint.config.js"]
4
- }
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": ["node_modules", "test", "dist", "**/*spec.ts", "eslint.config.js"]
4
+ }
package/tsconfig.json CHANGED
@@ -1,26 +1,26 @@
1
- {
2
- "extends": "@rubiin/tsconfig",
3
- "compilerOptions": {
4
- "module": "commonjs",
5
- "declaration": true,
6
- "removeComments": true,
7
- "emitDecoratorMetadata": true,
8
- "experimentalDecorators": true,
9
- "allowSyntheticDefaultImports": true,
10
- "target": "ES2022",
11
- "sourceMap": true,
12
- "outDir": "./dist",
13
- "rootDir": "./src",
14
- "baseUrl": "./src",
15
- "incremental": true,
16
- "strict": true,
17
- "skipLibCheck": true,
18
- "strictNullChecks": false,
19
- "noImplicitAny": false,
20
- "strictBindCallApply": false,
21
- "forceConsistentCasingInFileNames": true,
22
- "noFallthroughCasesInSwitch": false
23
- },
24
- "include": ["test/**/*", "src/**/*", "eslint.config.js"],
25
- "typeRoots": ["./src/common/@types/typings"]
1
+ {
2
+ "extends": "@rubiin/tsconfig",
3
+ "compilerOptions": {
4
+ "module": "commonjs",
5
+ "declaration": true,
6
+ "removeComments": true,
7
+ "emitDecoratorMetadata": true,
8
+ "experimentalDecorators": true,
9
+ "allowSyntheticDefaultImports": true,
10
+ "target": "ES2022",
11
+ "sourceMap": true,
12
+ "outDir": "./dist",
13
+ "rootDir": "./src",
14
+ "baseUrl": "./src",
15
+ "incremental": true,
16
+ "strict": true,
17
+ "skipLibCheck": true,
18
+ "strictNullChecks": false,
19
+ "noImplicitAny": false,
20
+ "strictBindCallApply": false,
21
+ "forceConsistentCasingInFileNames": true,
22
+ "noFallthroughCasesInSwitch": false
23
+ },
24
+ "include": ["test/**/*", "src/**/*", "eslint.config.js"],
25
+ "typeRoots": ["./src/common/@types/typings"]
26
26
  }