rez_core 4.0.183 → 4.0.184

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 (613) hide show
  1. package/.claude/settings.local.json +26 -0
  2. package/.idea/250218_nodejs_core.iml +9 -0
  3. package/.idea/codeStyles/Project.xml +59 -0
  4. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  5. package/.idea/copilot.data.migration.agent.xml +6 -0
  6. package/.idea/copilot.data.migration.ask.xml +6 -0
  7. package/.idea/copilot.data.migration.ask2agent.xml +6 -0
  8. package/.idea/copilot.data.migration.edit.xml +6 -0
  9. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  10. package/.idea/misc.xml +6 -0
  11. package/.idea/modules.xml +8 -0
  12. package/.idea/prettier.xml +6 -0
  13. package/.idea/vcs.xml +6 -0
  14. package/.prettierrc +3 -3
  15. package/README.md +99 -99
  16. package/dist/app.module.js +0 -11
  17. package/dist/app.module.js.map +1 -1
  18. package/dist/config/config.module.js +2 -2
  19. package/dist/config/config.module.js.map +1 -1
  20. package/dist/config/database.config.d.ts +1 -1
  21. package/dist/config/database.config.js +16 -12
  22. package/dist/config/database.config.js.map +1 -1
  23. package/dist/core.module.d.ts +1 -1
  24. package/dist/core.module.js +3 -6
  25. package/dist/core.module.js.map +1 -1
  26. package/dist/main.js +1 -1
  27. package/dist/main.js.map +1 -1
  28. package/dist/module/auth/guards/role.guard.js +3 -3
  29. package/dist/module/auth/services/auth.service.js +3 -3
  30. package/dist/module/auth/services/auth.service.js.map +1 -1
  31. package/dist/module/enterprise/entity/organization.entity.js +1 -1
  32. package/dist/module/enterprise/repository/school.repository.js +3 -3
  33. package/dist/module/enterprise/repository/school.repository.js.map +1 -1
  34. package/dist/module/filter/repository/saved-filter.repository.js +4 -4
  35. package/dist/module/filter/service/filter-evaluator.service.js +3 -3
  36. package/dist/module/filter/service/filter-evaluator.service.js.map +1 -1
  37. package/dist/module/filter/service/filter.service.d.ts +4 -1
  38. package/dist/module/filter/service/filter.service.js +69 -39
  39. package/dist/module/filter/service/filter.service.js.map +1 -1
  40. package/dist/module/integration/entity/integration-config.entity.js +6 -6
  41. package/dist/module/integration/entity/integration-config.entity.js.map +1 -1
  42. package/dist/module/integration/entity/integration-entity-mapper.entity.js +1 -1
  43. package/dist/module/integration/entity/integration-entity-mapper.entity.js.map +1 -1
  44. package/dist/module/integration/entity/integration-source.entity.js +4 -4
  45. package/dist/module/integration/entity/integration-source.entity.js.map +1 -1
  46. package/dist/module/integration/entity/user-integration.entity.js +4 -4
  47. package/dist/module/integration/entity/user-integration.entity.js.map +1 -1
  48. package/dist/module/integration/examples/usage.example.js +9 -9
  49. package/dist/module/integration/service/integration.service.js +1 -1
  50. package/dist/module/integration/service/wrapper.service.d.ts +1 -3
  51. package/dist/module/integration/service/wrapper.service.js +65 -67
  52. package/dist/module/integration/service/wrapper.service.js.map +1 -1
  53. package/dist/module/listmaster/entity/list-master-items.entity.js +3 -3
  54. package/dist/module/listmaster/entity/list-master-items.entity.js.map +1 -1
  55. package/dist/module/listmaster/entity/list-master.entity.js +4 -4
  56. package/dist/module/listmaster/entity/list-master.entity.js.map +1 -1
  57. package/dist/module/listmaster/service/list-master-item.service.js +3 -3
  58. package/dist/module/listmaster/service/list-master-item.service.js.map +1 -1
  59. package/dist/module/mapper/entity/field-mapper.entity.js +6 -6
  60. package/dist/module/mapper/entity/field-mapper.entity.js.map +1 -1
  61. package/dist/module/mapper/service/field-mapper.service.js +7 -7
  62. package/dist/module/mapper/service/field-mapper.service.js.map +1 -1
  63. package/dist/module/mapper/service/mapper.service.js +4 -4
  64. package/dist/module/mapper/service/mapper.service.js.map +1 -1
  65. package/dist/module/meta/controller/attribute-master.controller.d.ts +1 -4
  66. package/dist/module/meta/controller/attribute-master.controller.js +2 -15
  67. package/dist/module/meta/controller/attribute-master.controller.js.map +1 -1
  68. package/dist/module/meta/entity/app-master.entity.d.ts +2 -2
  69. package/dist/module/meta/entity/app-master.entity.js +4 -4
  70. package/dist/module/meta/entity/entity-master.entity.js +1 -1
  71. package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
  72. package/dist/module/meta/entity/view-master.entity.js +1 -1
  73. package/dist/module/meta/entity/view-master.entity.js.map +1 -1
  74. package/dist/module/meta/entity.module.js +0 -7
  75. package/dist/module/meta/entity.module.js.map +1 -1
  76. package/dist/module/meta/repository/attribute-master.repository.js +2 -2
  77. package/dist/module/meta/repository/attribute-master.repository.js.map +1 -1
  78. package/dist/module/meta/repository/entity-master.repository.js +2 -2
  79. package/dist/module/meta/repository/entity-master.repository.js.map +1 -1
  80. package/dist/module/meta/service/attribute-master.service.js +1 -1
  81. package/dist/module/meta/service/attribute-master.service.js.map +1 -1
  82. package/dist/module/meta/service/entity-dynamic.service.js +27 -27
  83. package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
  84. package/dist/module/meta/service/entity-list.service.js +3 -3
  85. package/dist/module/meta/service/entity-master.service.js +4 -4
  86. package/dist/module/meta/service/entity-master.service.js.map +1 -1
  87. package/dist/module/meta/service/entity-relation.service.js +13 -13
  88. package/dist/module/meta/service/entity-relation.service.js.map +1 -1
  89. package/dist/module/meta/service/entity-service-impl.service.js +3 -3
  90. package/dist/module/meta/service/media-data.service.js +9 -9
  91. package/dist/module/meta/service/media-data.service.js.map +1 -1
  92. package/dist/module/meta/service/resolver.service.js +19 -19
  93. package/dist/module/meta/service/resolver.service.js.map +1 -1
  94. package/dist/module/module/repository/menu.repository.js +12 -12
  95. package/dist/module/module/service/module-access.service.js +1 -1
  96. package/dist/module/module/service/module-access.service.js.map +1 -1
  97. package/dist/module/notification/entity/otp.entity.js +1 -1
  98. package/dist/module/notification/entity/otp.entity.js.map +1 -1
  99. package/dist/module/notification/service/notification.service.js +26 -22
  100. package/dist/module/notification/service/notification.service.js.map +1 -1
  101. package/dist/module/user/controller/login.controller.js +18 -18
  102. package/dist/module/user/entity/user-role-mapping.entity.js +1 -1
  103. package/dist/module/user/entity/user-role-mapping.entity.js.map +1 -1
  104. package/dist/module/user/service/login.service.js +1 -1
  105. package/dist/module/user/service/login.service.js.map +1 -1
  106. package/dist/module/user/service/role.service.js +4 -4
  107. package/dist/module/user/service/user-session.service.js +4 -4
  108. package/dist/module/user/service/user-session.service.js.map +1 -1
  109. package/dist/module/workflow/entity/action-category.entity.d.ts +1 -1
  110. package/dist/module/workflow/entity/action-category.entity.js +1 -1
  111. package/dist/module/workflow/entity/action-data.entity.js +1 -1
  112. package/dist/module/workflow/entity/action-data.entity.js.map +1 -1
  113. package/dist/module/workflow/entity/action.entity.d.ts +0 -1
  114. package/dist/module/workflow/entity/action.entity.js +1 -5
  115. package/dist/module/workflow/entity/action.entity.js.map +1 -1
  116. package/dist/module/workflow/entity/comm-template.entity.js +1 -1
  117. package/dist/module/workflow/entity/comm-template.entity.js.map +1 -1
  118. package/dist/module/workflow/entity/template-attach-mapper.entity.js +1 -1
  119. package/dist/module/workflow/entity/template-attach-mapper.entity.js.map +1 -1
  120. package/dist/module/workflow/repository/action-data.repository.js +4 -5
  121. package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
  122. package/dist/module/workflow/repository/action.repository.js +21 -21
  123. package/dist/module/workflow/repository/action.repository.js.map +1 -1
  124. package/dist/module/workflow/repository/comm-template.repository.js +7 -7
  125. package/dist/module/workflow/repository/comm-template.repository.js.map +1 -1
  126. package/dist/module/workflow/repository/form-master.repository.js +3 -3
  127. package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
  128. package/dist/module/workflow/repository/stage-group.repository.js +23 -23
  129. package/dist/module/workflow/repository/stage-movement.repository.js +17 -17
  130. package/dist/module/workflow/repository/stage-movement.repository.js.map +1 -1
  131. package/dist/module/workflow/repository/stage.repository.js +8 -8
  132. package/dist/module/workflow/repository/task.repository.d.ts +1 -3
  133. package/dist/module/workflow/repository/task.repository.js +5 -10
  134. package/dist/module/workflow/repository/task.repository.js.map +1 -1
  135. package/dist/module/workflow/service/action-template-mapping.service.js +22 -22
  136. package/dist/module/workflow/service/action.service.js +13 -13
  137. package/dist/module/workflow/service/action.service.js.map +1 -1
  138. package/dist/module/workflow/service/entity-modification.service.js +6 -6
  139. package/dist/module/workflow/service/populate-workflow.service.js +8 -8
  140. package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
  141. package/dist/module/workflow/service/stage-group.service.js +6 -6
  142. package/dist/module/workflow/service/stage-group.service.js.map +1 -1
  143. package/dist/module/workflow/service/stage.service.js +4 -4
  144. package/dist/module/workflow/service/stage.service.js.map +1 -1
  145. package/dist/module/workflow/service/task.service.js +54 -68
  146. package/dist/module/workflow/service/task.service.js.map +1 -1
  147. package/dist/module/workflow/service/workflow-list-master.service.js +16 -16
  148. package/dist/module/workflow/service/workflow-list-master.service.js.map +1 -1
  149. package/dist/module/workflow/service/workflow-meta.service.js +51 -53
  150. package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
  151. package/dist/module/workflow/service/workflow.service.js +5 -5
  152. package/dist/module/workflow/service/workflow.service.js.map +1 -1
  153. package/dist/module/workflow-automation/controller/workflow-automation.controller.d.ts +0 -6
  154. package/dist/module/workflow-automation/controller/workflow-automation.controller.js +0 -16
  155. package/dist/module/workflow-automation/controller/workflow-automation.controller.js.map +1 -1
  156. package/dist/module/workflow-automation/entity/workflow-automation-action.entity.d.ts +1 -1
  157. package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js +1 -1
  158. package/dist/module/workflow-automation/entity/workflow-automation.entity.d.ts +0 -2
  159. package/dist/module/workflow-automation/entity/workflow-automation.entity.js +0 -8
  160. package/dist/module/workflow-automation/entity/workflow-automation.entity.js.map +1 -1
  161. package/dist/module/workflow-automation/service/workflow-automation-engine.service.d.ts +1 -1
  162. package/dist/module/workflow-automation/service/workflow-automation-engine.service.js +1 -1
  163. package/dist/module/workflow-automation/service/workflow-automation-engine.service.js.map +1 -1
  164. package/dist/module/workflow-automation/service/workflow-automation.service.d.ts +1 -13
  165. package/dist/module/workflow-automation/service/workflow-automation.service.js +6 -115
  166. package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
  167. package/dist/module/workflow-automation/workflow-automation.module.js +1 -14
  168. package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -1
  169. package/dist/table.config.js +1 -5
  170. package/dist/table.config.js.map +1 -1
  171. package/dist/tsconfig.build.tsbuildinfo +1 -1
  172. package/dist/utils/service/loggingUtil.service.d.ts +2 -9
  173. package/dist/utils/service/loggingUtil.service.js +14 -65
  174. package/dist/utils/service/loggingUtil.service.js.map +1 -1
  175. package/dist/utils/service/reflection-helper.service.js +3 -3
  176. package/dist/utils/service/reflection-helper.service.js.map +1 -1
  177. package/dist/utils/utils.module.js +0 -2
  178. package/dist/utils/utils.module.js.map +1 -1
  179. package/docs/modules/event-driven-integration-design.md +91 -91
  180. package/docs/modules/integration.md +250 -250
  181. package/eslint.config.mjs +34 -34
  182. package/nest-cli.json +14 -14
  183. package/package.json +120 -124
  184. package/server.log +850 -0
  185. package/src/app.controller.ts +12 -12
  186. package/src/app.module.ts +52 -66
  187. package/src/app.service.ts +8 -8
  188. package/src/config/config.module.ts +17 -18
  189. package/src/config/database.config.ts +48 -23
  190. package/src/constant/global.constant.ts +67 -67
  191. package/src/core.module.ts +81 -88
  192. package/src/decorators/roles.decorator.ts +7 -7
  193. package/src/dtos/response.dto.ts +6 -6
  194. package/src/dtos/response.ts +5 -5
  195. package/src/index.ts +1 -1
  196. package/src/module/auth/auth.module.ts +49 -49
  197. package/src/module/auth/controller/auth.controller.ts +28 -28
  198. package/src/module/auth/guards/google-auth.guard.ts +9 -9
  199. package/src/module/auth/guards/jwt.guard.ts +22 -22
  200. package/src/module/auth/guards/role.guard.ts +68 -68
  201. package/src/module/auth/services/auth.service.ts +50 -50
  202. package/src/module/auth/services/jwt.service.ts +11 -11
  203. package/src/module/auth/strategies/google.strategy.ts +54 -54
  204. package/src/module/auth/strategies/jwt.strategy.ts +58 -58
  205. package/src/module/auth/strategies/local.strategy.ts +13 -13
  206. package/src/module/dashboard/controller/dashboard.controller.ts +36 -36
  207. package/src/module/dashboard/dashboard.module.ts +21 -21
  208. package/src/module/dashboard/entity/dashboard_page_data.entity.ts +27 -27
  209. package/src/module/dashboard/entity/widget_master.entity.ts +18 -18
  210. package/src/module/dashboard/repository/dashboard.repository.ts +42 -42
  211. package/src/module/dashboard/service/dashboard.service.ts +73 -73
  212. package/src/module/dev/dev.module.ts +12 -12
  213. package/src/module/dev/service/dev.service.ts +7 -7
  214. package/src/module/enterprise/controller/organization.controller.ts +36 -36
  215. package/src/module/enterprise/enterprise.module.ts +30 -30
  216. package/src/module/enterprise/entity/enterprise.entity.ts +37 -37
  217. package/src/module/enterprise/entity/organization-app-mapping.entity.ts +13 -13
  218. package/src/module/enterprise/entity/organization.entity.ts +92 -92
  219. package/src/module/enterprise/repository/enterprise.repository.ts +31 -31
  220. package/src/module/enterprise/repository/organization.repository.ts +26 -26
  221. package/src/module/enterprise/repository/school.repository.ts +278 -278
  222. package/src/module/enterprise/service/brand.service.ts +5 -5
  223. package/src/module/enterprise/service/enterprise.service.ts +16 -16
  224. package/src/module/enterprise/service/organization-app-mapping.service.ts +4 -4
  225. package/src/module/enterprise/service/organization.service.ts +145 -145
  226. package/src/module/filter/controller/filter.controller.ts +84 -84
  227. package/src/module/filter/dto/filter-request.dto.ts +38 -38
  228. package/src/module/filter/entity/saved-filter-detail.entity.ts +41 -41
  229. package/src/module/filter/entity/saved-filter-master.entity.ts +23 -23
  230. package/src/module/filter/filter.module.ts +31 -31
  231. package/src/module/filter/repository/saved-filter.repository.ts +168 -168
  232. package/src/module/filter/service/filter-evaluator.service.ts +86 -86
  233. package/src/module/filter/service/filter.service.ts +1053 -1005
  234. package/src/module/filter/service/saved-filter.service.ts +170 -170
  235. package/src/module/ics/controller/ics.controller.ts +21 -21
  236. package/src/module/ics/dto/ics.dto.ts +55 -55
  237. package/src/module/ics/ics.module.ts +13 -13
  238. package/src/module/ics/service/ics.service.ts +57 -57
  239. package/src/module/integration/controller/calender-event.controller.ts +31 -31
  240. package/src/module/integration/controller/integration.controller.ts +662 -662
  241. package/src/module/integration/controller/wrapper.controller.ts +37 -37
  242. package/src/module/integration/dto/create-config.dto.ts +526 -526
  243. package/src/module/integration/entity/integration-config.entity.ts +112 -112
  244. package/src/module/integration/entity/integration-entity-mapper.entity.ts +14 -14
  245. package/src/module/integration/entity/integration-source.entity.ts +17 -17
  246. package/src/module/integration/entity/user-integration.entity.ts +71 -71
  247. package/src/module/integration/examples/usage.example.ts +338 -338
  248. package/src/module/integration/factories/base.factory.ts +7 -7
  249. package/src/module/integration/factories/email.factory.ts +49 -49
  250. package/src/module/integration/factories/integration.factory.ts +121 -121
  251. package/src/module/integration/factories/sms.factory.ts +51 -51
  252. package/src/module/integration/factories/telephone.factory.ts +41 -41
  253. package/src/module/integration/factories/whatsapp.factory.ts +56 -56
  254. package/src/module/integration/integration.module.ts +110 -110
  255. package/src/module/integration/service/calendar-event.service.ts +118 -118
  256. package/src/module/integration/service/integration-entity-mapper.service.ts +17 -17
  257. package/src/module/integration/service/integration-queue.service.ts +229 -229
  258. package/src/module/integration/service/integration.service.ts +2633 -2633
  259. package/src/module/integration/service/oauth.service.ts +224 -224
  260. package/src/module/integration/service/wrapper.service.ts +494 -700
  261. package/src/module/integration/strategies/email/gmail-api.strategy.ts +280 -280
  262. package/src/module/integration/strategies/email/outlook-api.strategy.ts +44 -44
  263. package/src/module/integration/strategies/email/outlook.strategy.ts +64 -64
  264. package/src/module/integration/strategies/email/sendgrid-api.strategy.ts +260 -260
  265. package/src/module/integration/strategies/integration.strategy.ts +97 -97
  266. package/src/module/integration/strategies/sms/gupshup-sms.strategy.ts +146 -146
  267. package/src/module/integration/strategies/sms/msg91-sms.strategy.ts +164 -164
  268. package/src/module/integration/strategies/sms/tubelight-sms.strategy.ts +163 -163
  269. package/src/module/integration/strategies/telephone/ozonetel-voice.strategy.ts +238 -238
  270. package/src/module/integration/strategies/telephone/tubelight-voice.strategy.ts +210 -210
  271. package/src/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.ts +359 -359
  272. package/src/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.ts +372 -372
  273. package/src/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.ts +403 -403
  274. package/src/module/integration/strategies/whatsapp/whatsapp.strategy.ts +57 -57
  275. package/src/module/layout/controller/layout.controller.ts +47 -47
  276. package/src/module/layout/entity/header-items.entity.ts +28 -28
  277. package/src/module/layout/entity/header-section.entity.ts +19 -19
  278. package/src/module/layout/layout.module.ts +21 -21
  279. package/src/module/layout/repository/header-items.repository.ts +18 -18
  280. package/src/module/layout/repository/header-section.repository.ts +22 -22
  281. package/src/module/layout/service/header-section.service.ts +25 -25
  282. package/src/module/layout_preference/controller/layout_preference.controller.ts +73 -73
  283. package/src/module/layout_preference/entity/layout_preference.entity.ts +28 -28
  284. package/src/module/layout_preference/layout_preference.module.ts +22 -22
  285. package/src/module/layout_preference/repository/layout_preference.repository.ts +65 -65
  286. package/src/module/layout_preference/service/layout_preference.service.ts +191 -191
  287. package/src/module/lead/controller/lead.controller.ts +30 -30
  288. package/src/module/lead/lead.module.ts +14 -14
  289. package/src/module/lead/repository/lead.repository.ts +41 -41
  290. package/src/module/lead/service/lead.service.ts +54 -54
  291. package/src/module/listmaster/controller/list-master.controller.ts +230 -230
  292. package/src/module/listmaster/entity/list-master-items.entity.ts +43 -43
  293. package/src/module/listmaster/entity/list-master.entity.ts +33 -33
  294. package/src/module/listmaster/listmaster.module.ts +46 -46
  295. package/src/module/listmaster/repository/list-master-items.repository.ts +169 -169
  296. package/src/module/listmaster/repository/list-master.repository.ts +46 -46
  297. package/src/module/listmaster/service/list-master-engine.ts +19 -19
  298. package/src/module/listmaster/service/list-master-extension.interface.ts +4 -4
  299. package/src/module/listmaster/service/list-master-item.service.ts +292 -292
  300. package/src/module/listmaster/service/list-master-registry.ts +15 -15
  301. package/src/module/listmaster/service/list-master.service.ts +535 -535
  302. package/src/module/mapper/controller/field-mapper.controller.ts +76 -76
  303. package/src/module/mapper/controller/mapper.controller.ts +20 -20
  304. package/src/module/mapper/dto/field-mapper.dto.ts +14 -14
  305. package/src/module/mapper/entity/field-lovs.entity.ts +19 -19
  306. package/src/module/mapper/entity/field-mapper.entity.ts +53 -53
  307. package/src/module/mapper/entity/mapper.entity.ts +16 -16
  308. package/src/module/mapper/mapper.module.ts +34 -34
  309. package/src/module/mapper/repository/field-lovs.repository.ts +35 -35
  310. package/src/module/mapper/repository/field-mapper.repository.ts +42 -42
  311. package/src/module/mapper/repository/mapper.repository.ts +15 -15
  312. package/src/module/mapper/service/field-mapper.service.ts +266 -271
  313. package/src/module/mapper/service/mapper.service.ts +79 -79
  314. package/src/module/master/controller/master.controller.ts +74 -74
  315. package/src/module/master/service/master.service.ts +483 -483
  316. package/src/module/meta/controller/app-master.controller.ts +38 -38
  317. package/src/module/meta/controller/attribute-master.controller.ts +66 -74
  318. package/src/module/meta/controller/entity-dynamic.controller.ts +125 -125
  319. package/src/module/meta/controller/entity-master.controller.ts +28 -28
  320. package/src/module/meta/controller/entity-relation.controller.ts +36 -36
  321. package/src/module/meta/controller/entity.controller.ts +392 -392
  322. package/src/module/meta/controller/entity.public.controller.ts +75 -75
  323. package/src/module/meta/controller/media.controller.ts +107 -107
  324. package/src/module/meta/controller/meta.controller.ts +96 -96
  325. package/src/module/meta/controller/view-master.controller.ts +86 -86
  326. package/src/module/meta/dto/entity-list-data.dto.ts +6 -6
  327. package/src/module/meta/dto/entity-tab.dto.ts +4 -4
  328. package/src/module/meta/dto/entity-table.dto.ts +9 -9
  329. package/src/module/meta/entity/app-master.entity.ts +34 -34
  330. package/src/module/meta/entity/attribute-master.entity.ts +89 -89
  331. package/src/module/meta/entity/base-entity.entity.ts +75 -75
  332. package/src/module/meta/entity/entity-master.entity.ts +85 -85
  333. package/src/module/meta/entity/entity-relation-data.entity.ts +29 -29
  334. package/src/module/meta/entity/entity-relation.entity.ts +23 -23
  335. package/src/module/meta/entity/entity-table-column.entity.ts +61 -61
  336. package/src/module/meta/entity/entity-table.entity.ts +50 -50
  337. package/src/module/meta/entity/media-data.entity.ts +32 -32
  338. package/src/module/meta/entity/preference.entity.ts +62 -62
  339. package/src/module/meta/entity/view-master.entity.ts +41 -41
  340. package/src/module/meta/entity.module.ts +158 -166
  341. package/src/module/meta/repository/app-master.repository.ts +20 -20
  342. package/src/module/meta/repository/attribute-master.repository.ts +118 -118
  343. package/src/module/meta/repository/entity-master.repository.ts +69 -69
  344. package/src/module/meta/repository/entity-table-column.repository.ts +39 -39
  345. package/src/module/meta/repository/entity-table.repository.ts +53 -53
  346. package/src/module/meta/repository/media-data.repository.ts +50 -50
  347. package/src/module/meta/repository/preference.repository.ts +20 -20
  348. package/src/module/meta/repository/user-app-mapping.repository.ts +28 -28
  349. package/src/module/meta/repository/view-master.repository.ts +42 -42
  350. package/src/module/meta/service/app-master.service.ts +37 -37
  351. package/src/module/meta/service/attribute-master.service.ts +126 -126
  352. package/src/module/meta/service/common.service.ts +9 -9
  353. package/src/module/meta/service/entity-dynamic.service.ts +819 -819
  354. package/src/module/meta/service/entity-list.service.ts +205 -205
  355. package/src/module/meta/service/entity-master.service.ts +169 -169
  356. package/src/module/meta/service/entity-realation-data.service.ts +9 -9
  357. package/src/module/meta/service/entity-relation.service.ts +69 -69
  358. package/src/module/meta/service/entity-service-impl.service.ts +525 -525
  359. package/src/module/meta/service/entity-table-column.service.ts +39 -39
  360. package/src/module/meta/service/entity-table.service.ts +150 -150
  361. package/src/module/meta/service/entity-validation.service.ts +187 -187
  362. package/src/module/meta/service/entity.service.ts +67 -67
  363. package/src/module/meta/service/field-group.service.ts +103 -103
  364. package/src/module/meta/service/media-data.service.ts +507 -507
  365. package/src/module/meta/service/populate-meta.service.ts +193 -193
  366. package/src/module/meta/service/preference.service.ts +16 -16
  367. package/src/module/meta/service/resolver.service.ts +267 -267
  368. package/src/module/meta/service/section-master.service.ts +104 -104
  369. package/src/module/meta/service/update-form-json.service.ts +22 -22
  370. package/src/module/meta/service/user-app-mapping.service.ts +17 -17
  371. package/src/module/meta/service/view-master.service.ts +127 -127
  372. package/src/module/microservice-client/microservice-clients.module.ts +13 -13
  373. package/src/module/microservice-client/service/microservice-client-factory.ts +37 -37
  374. package/src/module/microservice-client/service/microservice-clients.ts +4 -4
  375. package/src/module/module/controller/menu.controller.ts +15 -15
  376. package/src/module/module/controller/module-access.controller.ts +134 -134
  377. package/src/module/module/entity/menu.entity.ts +43 -43
  378. package/src/module/module/entity/module-access.entity.ts +25 -25
  379. package/src/module/module/entity/module-action.entity.ts +17 -17
  380. package/src/module/module/entity/module.entity.ts +52 -52
  381. package/src/module/module/module.module.ts +42 -42
  382. package/src/module/module/repository/menu.repository.ts +184 -184
  383. package/src/module/module/repository/module-access.repository.ts +344 -344
  384. package/src/module/module/service/menu.service.ts +82 -82
  385. package/src/module/module/service/module-access.service.ts +207 -209
  386. package/src/module/notification/controller/notification.controller.ts +58 -58
  387. package/src/module/notification/controller/otp.controller.ts +117 -117
  388. package/src/module/notification/entity/notification.entity.ts +26 -26
  389. package/src/module/notification/entity/otp.entity.ts +28 -28
  390. package/src/module/notification/firebase-admin.config.ts +22 -22
  391. package/src/module/notification/notification.module.ts +69 -69
  392. package/src/module/notification/repository/otp.repository.ts +27 -27
  393. package/src/module/notification/service/email.service.ts +127 -127
  394. package/src/module/notification/service/notification.service.ts +160 -163
  395. package/src/module/notification/service/otp.service.ts +132 -132
  396. package/src/module/third-party-module/entity/third-party-api-registry.entity.ts +52 -52
  397. package/src/module/third-party-module/repository/third-party-api-registry.repository.ts +20 -20
  398. package/src/module/third-party-module/service/api-registry.service.ts +13 -13
  399. package/src/module/third-party-module/third-party.module.ts +12 -12
  400. package/src/module/user/controller/login.controller.ts +197 -197
  401. package/src/module/user/controller/user.controller.ts +40 -40
  402. package/src/module/user/dto/create-user.dto.ts +62 -62
  403. package/src/module/user/dto/update-user.dto.ts +4 -4
  404. package/src/module/user/entity/role.entity.ts +33 -33
  405. package/src/module/user/entity/user-role-mapping.entity.ts +38 -38
  406. package/src/module/user/entity/user-session.entity.ts +73 -73
  407. package/src/module/user/entity/user.entity.ts +59 -59
  408. package/src/module/user/repository/role.repository.ts +96 -96
  409. package/src/module/user/repository/user-role-mapping.repository.ts +126 -126
  410. package/src/module/user/repository/user.repository.ts +50 -50
  411. package/src/module/user/repository/userSession.repository.ts +33 -33
  412. package/src/module/user/service/login.service.ts +304 -304
  413. package/src/module/user/service/role.service.ts +189 -189
  414. package/src/module/user/service/user-role-mapping.service.ts +98 -98
  415. package/src/module/user/service/user-session.service.ts +168 -168
  416. package/src/module/user/service/user.service.ts +365 -365
  417. package/src/module/user/user.module.ts +65 -65
  418. package/src/module/workflow/controller/action-category.controller.ts +54 -54
  419. package/src/module/workflow/controller/action-resource-mapping.controller.ts +23 -23
  420. package/src/module/workflow/controller/action-template-mapping.controller.ts +35 -35
  421. package/src/module/workflow/controller/action.controller.ts +111 -111
  422. package/src/module/workflow/controller/activity-log.controller.ts +55 -55
  423. package/src/module/workflow/controller/comm-template.controller.ts +43 -43
  424. package/src/module/workflow/controller/entity-modification.controller.ts +35 -35
  425. package/src/module/workflow/controller/form-master.controller.ts +43 -43
  426. package/src/module/workflow/controller/stage-group.controller.ts +48 -48
  427. package/src/module/workflow/controller/stage.controller.ts +50 -50
  428. package/src/module/workflow/controller/task.controller.ts +77 -77
  429. package/src/module/workflow/controller/workflow-list-master.controller.ts +44 -44
  430. package/src/module/workflow/controller/workflow-meta.controller.ts +80 -80
  431. package/src/module/workflow/controller/workflow.controller.ts +67 -67
  432. package/src/module/workflow/entity/action-category.entity.ts +38 -38
  433. package/src/module/workflow/entity/action-data.entity.ts +55 -55
  434. package/src/module/workflow/entity/action-resources-mapping.entity.ts +29 -29
  435. package/src/module/workflow/entity/action-template-mapping.entity.ts +17 -17
  436. package/src/module/workflow/entity/action.entity.ts +50 -53
  437. package/src/module/workflow/entity/activity-log.entity.ts +43 -43
  438. package/src/module/workflow/entity/comm-template.entity.ts +43 -43
  439. package/src/module/workflow/entity/entity-modification.entity.ts +38 -38
  440. package/src/module/workflow/entity/form.entity.ts +25 -25
  441. package/src/module/workflow/entity/stage-action-mapping.entity.ts +17 -17
  442. package/src/module/workflow/entity/stage-group.entity.ts +23 -23
  443. package/src/module/workflow/entity/stage-movement-data.entity.ts +38 -38
  444. package/src/module/workflow/entity/stage.entity.ts +20 -20
  445. package/src/module/workflow/entity/task-data.entity.ts +88 -88
  446. package/src/module/workflow/entity/template-attach-mapper.entity.ts +30 -30
  447. package/src/module/workflow/entity/workflow-data.entity.ts +11 -11
  448. package/src/module/workflow/entity/workflow-level-mapping.entity.ts +18 -18
  449. package/src/module/workflow/entity/workflow.entity.ts +20 -20
  450. package/src/module/workflow/repository/action-category.repository.ts +79 -79
  451. package/src/module/workflow/repository/action-data.repository.ts +333 -334
  452. package/src/module/workflow/repository/action.repository.ts +323 -323
  453. package/src/module/workflow/repository/activity-log.repository.ts +148 -148
  454. package/src/module/workflow/repository/comm-template.repository.ts +149 -149
  455. package/src/module/workflow/repository/form-master.repository.ts +59 -59
  456. package/src/module/workflow/repository/stage-group.repository.ts +176 -176
  457. package/src/module/workflow/repository/stage-movement.repository.ts +244 -244
  458. package/src/module/workflow/repository/stage.repository.ts +172 -172
  459. package/src/module/workflow/repository/task.repository.ts +126 -134
  460. package/src/module/workflow/repository/workflow.repository.ts +42 -42
  461. package/src/module/workflow/service/action-category.service.ts +33 -33
  462. package/src/module/workflow/service/action-data.service.ts +62 -62
  463. package/src/module/workflow/service/action-resources-mapping.service.ts +10 -10
  464. package/src/module/workflow/service/action-template-mapping.service.ts +106 -106
  465. package/src/module/workflow/service/action.service.ts +279 -279
  466. package/src/module/workflow/service/activity-log.service.ts +107 -107
  467. package/src/module/workflow/service/comm-template.service.ts +180 -180
  468. package/src/module/workflow/service/entity-modification.service.ts +67 -67
  469. package/src/module/workflow/service/form-master.service.ts +35 -35
  470. package/src/module/workflow/service/populate-workflow.service.ts +303 -303
  471. package/src/module/workflow/service/stage-action-mapping.service.ts +5 -5
  472. package/src/module/workflow/service/stage-group.service.ts +319 -319
  473. package/src/module/workflow/service/stage.service.ts +199 -199
  474. package/src/module/workflow/service/task.service.ts +560 -569
  475. package/src/module/workflow/service/workflow-list-master.service.ts +60 -60
  476. package/src/module/workflow/service/workflow-meta.service.ts +640 -654
  477. package/src/module/workflow/service/workflow.service.ts +205 -205
  478. package/src/module/workflow/workflow.module.ts +176 -176
  479. package/src/module/workflow-automation/controller/workflow-automation.controller.ts +21 -43
  480. package/src/module/workflow-automation/entity/workflow-automation-action.entity.ts +26 -26
  481. package/src/module/workflow-automation/entity/workflow-automation.entity.ts +35 -40
  482. package/src/module/workflow-automation/interface/action.decorator.ts +7 -7
  483. package/src/module/workflow-automation/interface/action.interface.ts +5 -5
  484. package/src/module/workflow-automation/service/action-registery.service.ts +35 -35
  485. package/src/module/workflow-automation/service/workflow-automation-engine.service.ts +214 -214
  486. package/src/module/workflow-automation/service/workflow-automation.service.ts +347 -508
  487. package/src/module/workflow-automation/workflow-automation.module.ts +34 -47
  488. package/src/resources/dev.properties.yaml +31 -30
  489. package/src/resources/local.properties.yaml +27 -27
  490. package/src/resources/properties.module.ts +12 -12
  491. package/src/resources/properties.yaml.ts +11 -11
  492. package/src/resources/uat.properties.yaml +31 -31
  493. package/src/table.config.ts +126 -130
  494. package/src/utils/dto/excel-data.dto.ts +14 -14
  495. package/src/utils/dto/excelsheet-data.dto.ts +5 -5
  496. package/src/utils/service/base64util.service.ts +18 -18
  497. package/src/utils/service/clockIDGenUtil.service.ts +21 -21
  498. package/src/utils/service/codeGenerator.service.ts +22 -22
  499. package/src/utils/service/dateUtil.service.ts +17 -17
  500. package/src/utils/service/encryptUtil.service.ts +97 -97
  501. package/src/utils/service/excel-helper.service.ts +72 -72
  502. package/src/utils/service/excelUtil.service.ts +15 -15
  503. package/src/utils/service/file-util.service.ts +11 -11
  504. package/src/utils/service/json-util.service.ts +23 -23
  505. package/src/utils/service/loggingUtil.service.ts +34 -88
  506. package/src/utils/service/reflection-helper.service.ts +62 -62
  507. package/src/utils/service/wbsCodeGen.service.ts +8 -8
  508. package/src/utils/utils.module.ts +25 -27
  509. package/tsconfig.build.json +4 -4
  510. package/tsconfig.json +24 -24
  511. package/dist/config/bull.config.d.ts +0 -10
  512. package/dist/config/bull.config.js +0 -66
  513. package/dist/config/bull.config.js.map +0 -1
  514. package/dist/module/entity_json/controller/entity_json.controller.d.ts +0 -11
  515. package/dist/module/entity_json/controller/entity_json.controller.js +0 -56
  516. package/dist/module/entity_json/controller/entity_json.controller.js.map +0 -1
  517. package/dist/module/entity_json/entity_json.module.d.ts +0 -2
  518. package/dist/module/entity_json/entity_json.module.js +0 -26
  519. package/dist/module/entity_json/entity_json.module.js.map +0 -1
  520. package/dist/module/entity_json/service/entity_json.service.d.ts +0 -8
  521. package/dist/module/entity_json/service/entity_json.service.js +0 -100
  522. package/dist/module/entity_json/service/entity_json.service.js.map +0 -1
  523. package/dist/module/linked_attributes/controller/linked_attributes.controller.d.ts +0 -5
  524. package/dist/module/linked_attributes/controller/linked_attributes.controller.js +0 -29
  525. package/dist/module/linked_attributes/controller/linked_attributes.controller.js.map +0 -1
  526. package/dist/module/linked_attributes/entity/linked_attribute.entity.d.ts +0 -9
  527. package/dist/module/linked_attributes/entity/linked_attribute.entity.js +0 -70
  528. package/dist/module/linked_attributes/entity/linked_attribute.entity.js.map +0 -1
  529. package/dist/module/linked_attributes/linked_attributes.module.d.ts +0 -2
  530. package/dist/module/linked_attributes/linked_attributes.module.js +0 -29
  531. package/dist/module/linked_attributes/linked_attributes.module.js.map +0 -1
  532. package/dist/module/linked_attributes/repository/linked_attribute.repository.d.ts +0 -6
  533. package/dist/module/linked_attributes/repository/linked_attribute.repository.js +0 -31
  534. package/dist/module/linked_attributes/repository/linked_attribute.repository.js.map +0 -1
  535. package/dist/module/linked_attributes/service/linked_attributes.service.d.ts +0 -5
  536. package/dist/module/linked_attributes/service/linked_attributes.service.js +0 -34
  537. package/dist/module/linked_attributes/service/linked_attributes.service.js.map +0 -1
  538. package/dist/module/meta/repository/entity-attribute-update.repository.d.ts +0 -6
  539. package/dist/module/meta/repository/entity-attribute-update.repository.js +0 -44
  540. package/dist/module/meta/repository/entity-attribute-update.repository.js.map +0 -1
  541. package/dist/module/meta/service/entity-attribute-update.service.d.ts +0 -7
  542. package/dist/module/meta/service/entity-attribute-update.service.js +0 -36
  543. package/dist/module/meta/service/entity-attribute-update.service.js.map +0 -1
  544. package/dist/module/workflow-automation/service/schedule-handler.service.d.ts +0 -16
  545. package/dist/module/workflow-automation/service/schedule-handler.service.js +0 -109
  546. package/dist/module/workflow-automation/service/schedule-handler.service.js.map +0 -1
  547. package/dist/module/workflow-schedule/constants/schedule.constants.d.ts +0 -27
  548. package/dist/module/workflow-schedule/constants/schedule.constants.js +0 -31
  549. package/dist/module/workflow-schedule/constants/schedule.constants.js.map +0 -1
  550. package/dist/module/workflow-schedule/controller/workflow-schedule.controller.d.ts +0 -83
  551. package/dist/module/workflow-schedule/controller/workflow-schedule.controller.js +0 -220
  552. package/dist/module/workflow-schedule/controller/workflow-schedule.controller.js.map +0 -1
  553. package/dist/module/workflow-schedule/dto/create-schedule.dto.d.ts +0 -32
  554. package/dist/module/workflow-schedule/dto/create-schedule.dto.js +0 -163
  555. package/dist/module/workflow-schedule/dto/create-schedule.dto.js.map +0 -1
  556. package/dist/module/workflow-schedule/dto/get-execution-logs.dto.d.ts +0 -35
  557. package/dist/module/workflow-schedule/dto/get-execution-logs.dto.js +0 -124
  558. package/dist/module/workflow-schedule/dto/get-execution-logs.dto.js.map +0 -1
  559. package/dist/module/workflow-schedule/dto/update-schedule.dto.d.ts +0 -19
  560. package/dist/module/workflow-schedule/dto/update-schedule.dto.js +0 -106
  561. package/dist/module/workflow-schedule/dto/update-schedule.dto.js.map +0 -1
  562. package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.d.ts +0 -30
  563. package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.js +0 -113
  564. package/dist/module/workflow-schedule/entities/scheduled-workflow.entity.js.map +0 -1
  565. package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.d.ts +0 -34
  566. package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.js +0 -118
  567. package/dist/module/workflow-schedule/entities/workflow-execution-log.entity.js.map +0 -1
  568. package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.d.ts +0 -44
  569. package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.js +0 -3
  570. package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.js.map +0 -1
  571. package/dist/module/workflow-schedule/interfaces/workflow-schedule-options.interface.d.ts +0 -3
  572. package/dist/module/workflow-schedule/interfaces/workflow-schedule-options.interface.js +0 -3
  573. package/dist/module/workflow-schedule/interfaces/workflow-schedule-options.interface.js.map +0 -1
  574. package/dist/module/workflow-schedule/processors/schedule.processor.d.ts +0 -31
  575. package/dist/module/workflow-schedule/processors/schedule.processor.js +0 -409
  576. package/dist/module/workflow-schedule/processors/schedule.processor.js.map +0 -1
  577. package/dist/module/workflow-schedule/service/workflow-schedule.service.d.ts +0 -44
  578. package/dist/module/workflow-schedule/service/workflow-schedule.service.js +0 -434
  579. package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +0 -1
  580. package/dist/module/workflow-schedule/workflow-schedule.module.d.ts +0 -5
  581. package/dist/module/workflow-schedule/workflow-schedule.module.js +0 -52
  582. package/dist/module/workflow-schedule/workflow-schedule.module.js.map +0 -1
  583. package/src/config/bull.config.ts +0 -69
  584. package/src/module/entity_json/controller/entity_json.controller.ts +0 -45
  585. package/src/module/entity_json/entity_json.module.ts +0 -13
  586. package/src/module/entity_json/service/entity_json.service.ts +0 -134
  587. package/src/module/linked_attributes/controller/linked_attributes.controller.ts +0 -10
  588. package/src/module/linked_attributes/entity/linked_attribute.entity.ts +0 -48
  589. package/src/module/linked_attributes/linked_attributes.module.ts +0 -16
  590. package/src/module/linked_attributes/repository/linked_attribute.repository.ts +0 -12
  591. package/src/module/linked_attributes/service/linked_attributes.service.ts +0 -22
  592. package/src/module/meta/repository/entity-attribute-update.repository.ts +0 -44
  593. package/src/module/meta/service/entity-attribute-update.service.ts +0 -29
  594. package/src/module/workflow-automation/SCHEDULING_GUIDE.md +0 -145
  595. package/src/module/workflow-automation/service/schedule-handler.service.ts +0 -150
  596. package/src/module/workflow-schedule/INSTALLATION.md +0 -244
  597. package/src/module/workflow-schedule/MULTI_PROJECT_GUIDE.md +0 -196
  598. package/src/module/workflow-schedule/README.md +0 -422
  599. package/src/module/workflow-schedule/constants/schedule.constants.ts +0 -48
  600. package/src/module/workflow-schedule/controller/workflow-schedule.controller.ts +0 -255
  601. package/src/module/workflow-schedule/docs/CLAUDE_CODE_GUIDE.md +0 -510
  602. package/src/module/workflow-schedule/docs/CLAUDE_CODE_PROMPT.md +0 -362
  603. package/src/module/workflow-schedule/docs/RUN_CLAUDE_CODE.sh +0 -68
  604. package/src/module/workflow-schedule/dto/create-schedule.dto.ts +0 -147
  605. package/src/module/workflow-schedule/dto/get-execution-logs.dto.ts +0 -119
  606. package/src/module/workflow-schedule/dto/update-schedule.dto.ts +0 -96
  607. package/src/module/workflow-schedule/entities/scheduled-workflow.entity.ts +0 -148
  608. package/src/module/workflow-schedule/entities/workflow-execution-log.entity.ts +0 -154
  609. package/src/module/workflow-schedule/interfaces/schedule-job-data.interface.ts +0 -53
  610. package/src/module/workflow-schedule/interfaces/workflow-schedule-options.interface.ts +0 -12
  611. package/src/module/workflow-schedule/processors/schedule.processor.ts +0 -584
  612. package/src/module/workflow-schedule/service/workflow-schedule.service.ts +0 -600
  613. package/src/module/workflow-schedule/workflow-schedule.module.ts +0 -67
@@ -30,18 +30,18 @@ let CommTemplateRepository = class CommTemplateRepository {
30
30
  const { organization_id, level_id, level_type } = loggedInUser;
31
31
  let is_template;
32
32
  if (action_id) {
33
- const [actionResult] = await this.dataSource.query(`SELECT is_template
34
- FROM frm_wf_action
35
- WHERE id = ? AND organization_id = ?
33
+ const [actionResult] = await this.dataSource.query(`SELECT is_template
34
+ FROM frm_wf_action
35
+ WHERE id = $1 AND organization_id = $2
36
36
  LIMIT 1`, [action_id, organization_id]);
37
37
  if (!actionResult) {
38
38
  throw new Error('Invalid action_id');
39
39
  }
40
40
  is_template = actionResult.is_template;
41
- await this.dataSource.query(`UPDATE frm_wf_comm_template
42
- SET is_template = ?
43
- WHERE mapped_entity_type = ?
44
- AND organization_id = ? AND level_id = ? AND level_type=?`, [is_template, entity_type, organization_id, level_id, level_type]);
41
+ await this.dataSource.query(`UPDATE frm_wf_comm_template
42
+ SET is_template = $1
43
+ WHERE mapped_entity_type = $2
44
+ AND organization_id = $3 AND level_id = $4 AND level_type=$5`, [is_template, entity_type, organization_id, level_id, level_type]);
45
45
  }
46
46
  const whereCondition = {
47
47
  organization_id,
@@ -1 +1 @@
1
- {"version":3,"file":"comm-template.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/comm-template.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAmD;AACnD,qCAAiD;AACjD,yEAA8D;AAC9D,2FAAyE;AACzE,8EAA8E;AAGvE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAEmB,sBAAgD,EAEhD,oBAAgD,EAChD,gBAAkC,EAClC,UAAsB;QAJtB,2BAAsB,GAAtB,sBAAsB,CAA0B;QAEhD,yBAAoB,GAApB,oBAAoB,CAA4B;QAChD,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,kBAAkB,CACtB,WAAmB,EACnB,SAAkB,EAClB,YAAa;QAEb,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,YAAY,CAAC;QAE/D,IAAI,WAA+B,CAAC;QAGpC,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,CAAC,YAAY,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAChD;;;eAGO,EACP,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A5IY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,mCAAY,CAAC,CAAA;IAE9B,WAAA,IAAA,0BAAgB,EAAC,8CAAc,CAAC,CAAA;qCADQ,oBAAU;QAEZ,oBAAU;QACd,qCAAgB;QACtB,oBAAU;GAP9B,sBAAsB,CA4IlC"}
1
+ {"version":3,"file":"comm-template.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/comm-template.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+D;AAC/D,6CAAmD;AACnD,qCAAiD;AACjD,yEAA8D;AAC9D,2FAAyE;AACzE,8EAA8E;AAGvE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAEmB,sBAAgD,EAEhD,oBAAgD,EAChD,gBAAkC,EAClC,UAAsB;QAJtB,2BAAsB,GAAtB,sBAAsB,CAA0B;QAEhD,yBAAoB,GAApB,oBAAoB,CAA4B;QAChD,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,kBAAkB,CACtB,WAAmB,EACnB,SAAkB,EAClB,YAAa;QAEb,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,YAAY,CAAC;QAE/D,IAAI,WAA+B,CAAC;QAGpC,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,CAAC,YAAY,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAChD;;;eAGO,EACP,CAAC,SAAS,EAAE,eAAe,CAAC,CAC7B,CAAC;YAEF,IAAI,CAAC,YAAY,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACvC,CAAC;YAED,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC;YAEvC,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACzB;;;oEAG4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}
@@ -17,9 +17,9 @@ let FormMasterRepository = class FormMasterRepository {
17
17
  this.dataSource = dataSource;
18
18
  }
19
19
  async getForms(organization_id, source_entity_type) {
20
- const forms = await this.dataSource.query(`SELECT fm.id as fm_id, fm.name as fm_form_name
21
- FROM frm_entity_view fm
22
- WHERE fm.organization_id = ? AND fm.mapped_entity_type = ?`, [organization_id, source_entity_type]);
20
+ const forms = await this.dataSource.query(`SELECT fm.id as fm_id, fm.name as fm_form_name
21
+ FROM frm_entity_view fm
22
+ WHERE fm.organization_id = $1 AND fm.mapped_entity_type = $2`, [organization_id, source_entity_type]);
23
23
  const formatted = forms.map((form) => ({
24
24
  label: form.fm_form_name,
25
25
  value: form.fm_id,
@@ -1 +1 @@
1
- {"version":3,"file":"form-master.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/form-master.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAKwB;AAExB,qCAAiD;AAK1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAGtC,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,eAAuB,EAAE,kBAA0B;QAChE,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACvC;;kEAE4D,EAC5D,CAAC,eAAe,EAAE,kBAAkB,CAAC,CACtC,CAAC;QAEF,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC;YAC1C,KAAK,EAAE,IAAI,CAAC,YAAY;YACxB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC,CAAC;QAEJ,OAAO,SAAS,CAAC;IACnB,CAAC;IASD,KAAK,CAAC,UAAU,CAAC,aAAkB,EAAE,YAAsB;QAczD,OAAO,uEAAuE,CAAC;IACjF,CAAC;CACF,CAAA;AA9CY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAGoB,oBAAU;GAF9B,oBAAoB,CA8ChC"}
1
+ {"version":3,"file":"form-master.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/form-master.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAKwB;AAExB,qCAAiD;AAK1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAGtC,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,eAAuB,EAAE,kBAA0B;QAChE,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACvC;;oEAE8D,EAC9D,CAAC,eAAe,EAAE,kBAAkB,CAAC,CACtC,CAAC;QAEF,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC;YAC1C,KAAK,EAAE,IAAI,CAAC,YAAY;YACxB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC,CAAC;QAEJ,OAAO,SAAS,CAAC;IACnB,CAAC;IASD,KAAK,CAAC,UAAU,CAAC,aAAkB,EAAE,YAAsB;QAczD,OAAO,uEAAuE,CAAC;IACjF,CAAC;CACF,CAAA;AA9CY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAGoB,oBAAU;GAF9B,oBAAoB,CA8ChC"}
@@ -67,33 +67,33 @@ let StageGroupRepository = class StageGroupRepository {
67
67
  if (!stageGroups.length)
68
68
  return [];
69
69
  const stageGroupIds = stageGroups.map((sg) => sg.id);
70
- const stagesRaw = await this.dataSource.query(`
71
- SELECT
72
- frm_wf_stage.*
73
- FROM frm_wf_stage
74
- WHERE frm_wf_stage.stage_group_id IN (${stageGroupIds.map(() => '?').join(',')})
75
- AND frm_wf_stage.organization_id = ?
76
- ORDER BY frm_wf_stage.sequence ASC
70
+ const stagesRaw = await this.dataSource.query(`
71
+ SELECT
72
+ frm_wf_stage.*
73
+ FROM frm_wf_stage
74
+ WHERE frm_wf_stage.stage_group_id IN (${stageGroupIds.map(() => '?').join(',')})
75
+ AND frm_wf_stage.organization_id = $2
76
+ ORDER BY frm_wf_stage.sequence ASC
77
77
  `, [...stageGroupIds, loggedInUser.organization_id]);
78
78
  const stageIds = stagesRaw.map((s) => s.id);
79
- const taskCounts = await this.dataSource.query(`
80
- SELECT stage_id, COUNT(*) AS task_count
81
- FROM frm_wf_task_data
82
- WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND is_system=0 AND mapped_entity_id = ?
83
- GROUP BY stage_id
79
+ const taskCounts = await this.dataSource.query(`
80
+ SELECT stage_id, COUNT(*) AS task_count
81
+ FROM frm_wf_task_data
82
+ WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND is_system=0 AND mapped_entity_id = $2
83
+ GROUP BY stage_id
84
84
  `, [...stageIds, lead_id]);
85
- const meetingCounts = await this.dataSource.query(`
86
- SELECT stage_id, COUNT(*) AS meeting_count
87
- FROM crm_lead_meeting
88
- WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND mapped_entity_id = ?
89
- GROUP BY stage_id
85
+ const meetingCounts = await this.dataSource.query(`
86
+ SELECT stage_id, COUNT(*) AS meeting_count
87
+ FROM crm_lead_meeting
88
+ WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND mapped_entity_id = $2
89
+ GROUP BY stage_id
90
90
  `, [...stageIds, lead_id]);
91
- const sendCommCounts = await this.dataSource.query(`
92
- SELECT stage_id, COUNT(*) AS send_comm_count
93
- FROM crm_lead_communication
94
- WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND mapped_entity_id = ?
95
- AND type IN ('SEND', 'LOG')
96
- GROUP BY stage_id
91
+ const sendCommCounts = await this.dataSource.query(`
92
+ SELECT stage_id, COUNT(*) AS send_comm_count
93
+ FROM crm_lead_communication
94
+ WHERE stage_id IN (${stageIds.map(() => '?').join(',')}) AND mapped_entity_id = $2
95
+ AND type IN ('SEND', 'LOG')
96
+ GROUP BY stage_id
97
97
  `, [...stageIds, lead_id]);
98
98
  const taskCountMap = new Map(taskCounts.map((row) => [Number(row.stage_id), Number(row.task_count)]));
99
99
  const meetingCountMap = new Map(meetingCounts.map((row) => [
@@ -107,24 +107,24 @@ let StageMovementRepository = class StageMovementRepository {
107
107
  return nextStageGroupFirstStage || null;
108
108
  }
109
109
  async getAllActionByStageId(stageId) {
110
- const result = await this.dataSource.query(`
111
- SELECT
112
- a.*,
113
- m.id AS mapping_id,
114
- m.stage_id,
115
- ac.code AS action_category_code
116
- FROM frm_wf_action a
117
- LEFT JOIN frm_wf_stage_action_mapping m ON a.id = m.action_id
118
- LEFT JOIN frm_wf_action_category ac ON a.action_category = ac.id
119
- WHERE m.stage_id = ?
110
+ const result = await this.dataSource.query(`
111
+ SELECT
112
+ a.*,
113
+ m.id AS mapping_id,
114
+ m.stage_id,
115
+ ac.code AS action_category_code
116
+ FROM frm_wf_action a
117
+ LEFT JOIN frm_wf_stage_action_mapping m ON a.id = m.action_id
118
+ LEFT JOIN frm_wf_action_category ac ON a.action_category = ac.id
119
+ WHERE m.stage_id = $1
120
120
  `, [stageId]);
121
121
  for (const item of result) {
122
122
  if (item.action_category_code === 'SDFM') {
123
- const actionData = await this.dataSource.query(`
124
- SELECT arm.form_id
125
- FROM frm_wf_action_resources_mapping arm
126
- WHERE arm.stg_act_mapping_id = ? and form_id IS NOT NULL
127
- LIMIT 1
123
+ const actionData = await this.dataSource.query(`
124
+ SELECT arm.form_id
125
+ FROM frm_wf_action_resources_mapping arm
126
+ WHERE arm.stg_act_mapping_id = $1 and form_id IS NOT NULL
127
+ LIMIT 1
128
128
  `, [item.mapping_id]);
129
129
  item.form_id = actionData[0]?.form_id || null;
130
130
  }
@@ -134,14 +134,14 @@ let StageMovementRepository = class StageMovementRepository {
134
134
  async saveActionData(action, loggedInUser) {
135
135
  if (action.length > 0) {
136
136
  for (const act of action) {
137
- await this.dataSource.query(`INSERT INTO frm_wf_action_data (stage_id, user_id, action_id) VALUES (?, ?, ?)`, [act.stage_id, loggedInUser.id, act.id]);
137
+ await this.dataSource.query(`INSERT INTO frm_wf_action_data (stage_id, user_id, action_id) VALUES ($1, $2, $3)`, [act.stage_id, loggedInUser.id, act.id]);
138
138
  }
139
139
  }
140
140
  }
141
141
  async saveTaskData(actionData, loggedInUser) {
142
142
  if (actionData.length > 0) {
143
143
  for (const action of actionData) {
144
- await this.dataSource.query(`INSERT INTO frm_wf_task_data (action_id, user_id) VALUES (?, ?)`, [action.id, loggedInUser.id]);
144
+ await this.dataSource.query(`INSERT INTO frm_wf_task_data (action_id, user_id) VALUES ($1, $2)`, [action.id, loggedInUser.id]);
145
145
  }
146
146
  }
147
147
  }
@@ -1 +1 @@
1
- {"version":3,"file":"stage-movement.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/stage-movement.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAA2D;AAC3D,2FAAqF;AACrF,qEAA0D;AAC1D,yDAA+C;AAKxC,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAEmB,wBAAgE,EAEhE,cAAsC,EAEtC,SAA4B,EAC5B,UAAsB;QALtB,6BAAwB,GAAxB,wBAAwB,CAAwC;QAEhE,mBAAc,GAAd,cAAc,CAAwB;QAEtC,cAAS,GAAT,SAAS,CAAmB;QAC5B,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,aAAa,CAAC,EAClB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,GAKjB;QAEC,IAAI,oBAAoB,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC;YACrE,KAAK,EAAE;gBACL,iBAAiB,EAAE,YAAY,CAAC,UAAU;gBAC1C,eAAe,EAAE,YAAY,CAAC,QAAQ;aACvC;SACF,CAAC,CAAC;QAGH,IAAI,CAAC,oBAAoB,EAAE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xD,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,KAAK,MAAM,MAAM,IAAI,UAAU,EAAE,CAAC;gBAChC,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACzB,iEAAiE,EACjE,CAAC,MAAM,CAAC,EAAE,EAAE,YAAY,CAAC,EAAE,CAAC,CAC7B,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAxOY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,0DAA0B,CAAC,CAAA;IAE5C,WAAA,IAAA,0BAAgB,EAAC,+BAAU,CAAC,CAAA;IAE5B,WAAA,IAAA,0BAAgB,EAAC,oBAAK,CAAC,CAAA;qCAHmB,oBAAU;QAEpB,oBAAU;QAEf,oBAAU;QACT,oBAAU;GAR9B,uBAAuB,CAwOnC"}
1
+ {"version":3,"file":"stage-movement.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/stage-movement.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAA2D;AAC3D,2FAAqF;AACrF,qEAA0D;AAC1D,yDAA+C;AAKxC,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAEmB,wBAAgE,EAEhE,cAAsC,EAEtC,SAA4B,EAC5B,UAAsB;QALtB,6BAAwB,GAAxB,wBAAwB,CAAwC;QAEhE,mBAAc,GAAd,cAAc,CAAwB;QAEtC,cAAS,GAAT,SAAS,CAAmB;QAC5B,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,aAAa,CAAC,EAClB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,GAKjB;QAEC,IAAI,oBAAoB,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC;YACrE,KAAK,EAAE;gBACL,iBAAiB,EAAE,YAAY,CAAC,UA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CACxC,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,UAAe,EAAE,YAAsB;QAGxD,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,KAAK,MAAM,MAAM,IAAI,UAAU,EAAE,CAAC;gBAChC,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACzB,mEAAmE,EACnE,CAAC,MAAM,CAAC,EAAE,EAAE,YAAY,CAAC,EAAE,CAAC,CAC7B,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAxOY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,0DAA0B,CAAC,CAAA;IAE5C,WAAA,IAAA,0BAAgB,EAAC,+BAAU,CAAC,CAAA;IAE5B,WAAA,IAAA,0BAAgB,EAAC,oBAAK,CAAC,CAAA;qCAHmB,oBAAU;QAEpB,oBAAU;QAEf,oBAAU;QACT,oBAAU;GAR9B,uBAAuB,CAwOnC"}
@@ -62,14 +62,14 @@ let StageRepository = class StageRepository {
62
62
  if (!stageGroup) {
63
63
  return [];
64
64
  }
65
- const rows = await this.dataSource.query(`
66
- SELECT
67
- g.id as stage_group_id, g.name as stage_group_name, g.workflow_id,
68
- s.*
69
- FROM frm_wf_stage_group g
70
- INNER JOIN frm_wf_stage s ON s.stage_group_id = g.id
71
- WHERE g.workflow_id = ? AND g.organization_id = ? AND g.id = ?
72
- ORDER BY g.id, s.id
65
+ const rows = await this.dataSource.query(`
66
+ SELECT
67
+ g.id as stage_group_id, g.name as stage_group_name, g.workflow_id,
68
+ s.*
69
+ FROM frm_wf_stage_group g
70
+ INNER JOIN frm_wf_stage s ON s.stage_group_id = g.id
71
+ WHERE g.workflow_id = $1 AND g.organization_id = $2 AND g.id = $3
72
+ ORDER BY g.id, s.id
73
73
  `, [stageGroup.workflow_id, organization_id, stage_group_id]);
74
74
  if (!rows || rows.length === 0) {
75
75
  return [];
@@ -1,11 +1,9 @@
1
1
  import { TaskDataEntity } from '../entity/task-data.entity';
2
2
  import { DataSource, Repository } from 'typeorm';
3
- import { EntityDynamicService } from 'src/module/meta/service/entity-dynamic.service';
4
3
  export declare class TaskRepository {
5
4
  private readonly TaskRepository;
6
- private readonly entityDynamicService;
7
5
  private readonly dataSource;
8
- constructor(TaskRepository: Repository<TaskDataEntity>, entityDynamicService: EntityDynamicService, dataSource: DataSource);
6
+ constructor(TaskRepository: Repository<TaskDataEntity>, dataSource: DataSource);
9
7
  getAllTaskByUserIdAndStageId(condition: any): Promise<TaskDataEntity[]>;
10
8
  saveActionDataInTask(action: any, loggedInUser: any, mapped_entity_id: number, mapped_entity_type: string): Promise<any>;
11
9
  updateTaskStatus(loggedInUser: any, mapped_entity_type: any, mapped_entity_id: any, stage_id: any, action_id: any): Promise<any>;
@@ -17,11 +17,9 @@ const common_1 = require("@nestjs/common");
17
17
  const typeorm_1 = require("@nestjs/typeorm");
18
18
  const task_data_entity_1 = require("../entity/task-data.entity");
19
19
  const typeorm_2 = require("typeorm");
20
- const entity_dynamic_service_1 = require("../../meta/service/entity-dynamic.service");
21
20
  let TaskRepository = class TaskRepository {
22
- constructor(TaskRepository, entityDynamicService, dataSource) {
21
+ constructor(TaskRepository, dataSource) {
23
22
  this.TaskRepository = TaskRepository;
24
- this.entityDynamicService = entityDynamicService;
25
23
  this.dataSource = dataSource;
26
24
  }
27
25
  async getAllTaskByUserIdAndStageId(condition) {
@@ -35,11 +33,11 @@ let TaskRepository = class TaskRepository {
35
33
  async saveActionDataInTask(action, loggedInUser, mapped_entity_id, mapped_entity_type) {
36
34
  if (!action?.length)
37
35
  return;
38
- const todoListMasterItemId = await this.dataSource.query(`SELECT id FROM frm_list_master_items WHERE code = 'in_progress' and organization_id = ? and listtype = 'TKST' LIMIT 1;`, [loggedInUser.organization_id]);
39
- const leadData = await this.dataSource.query(`SELECT * FROM crm_lead WHERE id = ?`, [mapped_entity_id]);
36
+ const todoListMasterItemId = await this.dataSource.query(`SELECT id FROM frm_list_master_items WHERE code = 'in_progress' and organization_id = $1 and listtype = 'TKST' LIMIT 1;`, [loggedInUser.organization_id]);
37
+ const leadData = await this.dataSource.query(`SELECT * FROM crm_lead WHERE id = $1`, [mapped_entity_id]);
40
38
  if (action.length > 0) {
41
39
  for (const act of action) {
42
- const is_mandatory = await this.dataSource.query(`SELECT code FROM frm_list_master_items WHERE id = ? and organization_id = ? LIMIT 1;`, [act.action_requirement, loggedInUser.organization_id]);
40
+ const is_mandatory = await this.dataSource.query(`SELECT code FROM frm_list_master_items WHERE id = $1 and organization_id = $2 LIMIT 1;`, [act.action_requirement, loggedInUser.organization_id]);
43
41
  const now = new Date();
44
42
  const dueDateTime = new Date(now);
45
43
  dueDateTime.setDate(dueDateTime.getDate() + 2);
@@ -55,7 +53,6 @@ let TaskRepository = class TaskRepository {
55
53
  const due_date = istFormatterDate.format(dueDateTime);
56
54
  const due_time = istFormatterTime.format(dueDateTime);
57
55
  console.log({ due_date, due_time });
58
- const taskCode = await this.entityDynamicService.getCode('TASK', loggedInUser);
59
56
  const taskData = this.TaskRepository.create({
60
57
  stage_id: act.stage_id,
61
58
  user_id: loggedInUser.id,
@@ -74,7 +71,6 @@ let TaskRepository = class TaskRepository {
74
71
  status: todoListMasterItemId[0]?.id,
75
72
  category: act?.action_category_code,
76
73
  task_owner: leadData[0]?.lead_owner,
77
- code: taskCode,
78
74
  });
79
75
  await this.TaskRepository.save(taskData);
80
76
  }
@@ -89,7 +85,7 @@ let TaskRepository = class TaskRepository {
89
85
  });
90
86
  if (!task)
91
87
  return;
92
- const completedListMasterItemId = await this.dataSource.query(`SELECT id FROM frm_list_master_items WHERE code = 'completed' and organization_id = ? and listtype = 'TKST' LIMIT 1;`, [loggedInUser.organization_id]);
88
+ const completedListMasterItemId = await this.dataSource.query(`SELECT id FROM frm_list_master_items WHERE code = 'completed' and organization_id = $1 and listtype = 'TKST' LIMIT 1;`, [loggedInUser.organization_id]);
93
89
  task.modified_by = loggedInUser.id;
94
90
  task.modified_date = new Date();
95
91
  task.is_done = true;
@@ -102,7 +98,6 @@ exports.TaskRepository = TaskRepository = __decorate([
102
98
  (0, common_1.Injectable)(),
103
99
  __param(0, (0, typeorm_1.InjectRepository)(task_data_entity_1.TaskDataEntity)),
104
100
  __metadata("design:paramtypes", [typeorm_2.Repository,
105
- entity_dynamic_service_1.EntityDynamicService,
106
101
  typeorm_2.DataSource])
107
102
  ], TaskRepository);
108
103
  //# sourceMappingURL=task.repository.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"task.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/task.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAmD;AACnD,iEAA4D;AAC5D,qCAAiD;AACjD,sFAAsF;AAG/E,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAEmB,cAA0C,EAC1C,oBAA0C,EAC1C,UAAsB;QAFtB,mBAAc,GAAd,cAAc,CAA4B;QAC1C,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,4BAA4B,CAAC,SAAS;QAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;YAC5C,KAAK,EAAE;gBACL,GAAG,SAAS;aACb;SACF,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,MAAW,EACX,YAAY,EACZ,gBAAwB,EACxB,kBAA0B;QAE1B,IAAI,CAAC,MAAM,EAAE,MAAM;YAAE,OAAO;QAE5B,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACtD,wHAAwH,EACxH,CAAC,YAAY,CAAC,eAAe,CAAC,CAC/B,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UA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,CAAC,aAAa,GAAG,IAAI,IAAI,EAAE,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,yBAAyB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAE/C,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;AA9HY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,iCAAc,CAAC,CAAA;qCACA,oBAAU;QACJ,6CAAoB;QAC9B,oBAAU;GAL9B,cAAc,CA8H1B"}
1
+ {"version":3,"file":"task.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/task.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAmD;AACnD,iEAA4D;AAC5D,qCAAiD;AAG1C,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAEmB,cAA0C,EAC1C,UAAsB;QADtB,mBAAc,GAAd,cAAc,CAA4B;QAC1C,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,4BAA4B,CAAC,SAAS;QAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;YAC5C,KAAK,EAAE;gBACL,GAAG,SAAS;aACb;SACF,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,MAAW,EACX,YAAY,EACZ,gBAAwB,EACxB,kBAA0B;QAE1B,IAAI,CAAC,MAAM,EAAE,MAAM;YAAE,OAAO;QAE5B,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACtD,yHAAyH,EACzH,CAAC,YAAY,CAAC,eAAe,CAAC,CAC/B,CAAC;QAEF,MAAM,QAAQ,GAA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C,MAAM,GAAG,yBAAyB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAE/C,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;AAvHY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,iCAAc,CAAC,CAAA;qCACA,oBAAU;QACd,oBAAU;GAJ9B,cAAc,CAuH1B"}
@@ -21,26 +21,26 @@ let ActionTemplateMappingService = class ActionTemplateMappingService extends en
21
21
  async getTemplateByMode(stage_id, action_id, loggedInUser, mode) {
22
22
  let stageAction = [];
23
23
  if (action_id != 0) {
24
- stageAction = await this.dataSource.query(`
25
- SELECT id FROM frm_wf_stage_action_mapping
26
- WHERE action_id = ?
24
+ stageAction = await this.dataSource.query(`
25
+ SELECT id FROM frm_wf_stage_action_mapping
26
+ WHERE action_id = $1
27
27
  `, [action_id]);
28
28
  }
29
29
  else {
30
30
  let modeId = mode;
31
31
  if (!modeId) {
32
- const rows = await this.dataSource.query(`
33
- SELECT id
34
- FROM frm_list_master_items
35
- WHERE organization_id = ?
36
- AND listtype = "MOD" AND code = ?
32
+ const rows = await this.dataSource.query(`
33
+ SELECT id
34
+ FROM frm_list_master_items
35
+ WHERE organization_id = $1
36
+ AND listtype = "MOD" AND code = $2
37
37
  `, [loggedInUser.organization_id, 'email']);
38
38
  modeId = rows?.[0]?.id ?? 0;
39
39
  }
40
- const commTemplates = await this.dataSource.query(`
41
- SELECT code as value, name as label , id
42
- FROM frm_wf_comm_template
43
- WHERE mode = ? AND organization_id = ? AND level_type = ? AND level_id = ? AND status IN (SELECT id FROM frm_list_master_items WHERE code = "STATUS_ACTIVE" AND organization_id = ?)
40
+ const commTemplates = await this.dataSource.query(`
41
+ SELECT code as value, name as label , id
42
+ FROM frm_wf_comm_template
43
+ WHERE mode = $1 AND organization_id = $2 AND level_type = $3 AND level_id = $4 AND status IN (SELECT id FROM frm_list_master_items WHERE code = "STATUS_ACTIVE" AND organization_id = $5)
44
44
  `, [
45
45
  modeId,
46
46
  loggedInUser.organization_id,
@@ -54,23 +54,23 @@ let ActionTemplateMappingService = class ActionTemplateMappingService extends en
54
54
  return [];
55
55
  const stgActMappingId = stageAction[0].id;
56
56
  if (!mode) {
57
- const getModeFromAction = await this.dataSource.query(`
58
- SELECT mode FROM frm_wf_action
59
- WHERE id = ?
57
+ const getModeFromAction = await this.dataSource.query(`
58
+ SELECT mode FROM frm_wf_action
59
+ WHERE id = $1
60
60
  `, [action_id]);
61
61
  mode = getModeFromAction[0]?.mode;
62
62
  }
63
- const templates = await this.dataSource.query(`
64
- SELECT template_code FROM frm_wf_action_resources_mapping
65
- WHERE stg_act_mapping_id = ?
63
+ const templates = await this.dataSource.query(`
64
+ SELECT template_code FROM frm_wf_action_resources_mapping
65
+ WHERE stg_act_mapping_id = $1
66
66
  `, [stgActMappingId]);
67
67
  const templateCodes = templates.map((t) => t.template_code);
68
68
  if (!templateCodes.length)
69
69
  return [];
70
- const commTemplates = await this.dataSource.query(`
71
- SELECT code as value, name as label , id
72
- FROM frm_wf_comm_template
73
- WHERE code IN (?) AND mode = ? AND organization_id = ? AND level_type = ? AND level_id = ? AND status IN (SELECT id FROM frm_list_master_items WHERE code = "STATUS_ACTIVE" AND organization_id = ?)
70
+ const commTemplates = await this.dataSource.query(`
71
+ SELECT code as value, name as label , id
72
+ FROM frm_wf_comm_template
73
+ WHERE code IN ($1) AND mode = $2 AND organization_id = $3 AND level_type = $4 AND level_id = $5 AND status IN (SELECT id FROM frm_list_master_items WHERE code = "STATUS_ACTIVE" AND organization_id = $6)
74
74
  `, [
75
75
  templateCodes,
76
76
  mode,
@@ -25,12 +25,12 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
25
25
  if (!actionData) {
26
26
  return null;
27
27
  }
28
- const result = await this.dataSource.query(`SELECT template_code, form_id
29
- FROM frm_wf_action_resources_mapping
30
- WHERE stg_act_mapping_id IN (
31
- SELECT id
32
- FROM frm_wf_stage_action_mapping
33
- WHERE action_id = ? AND entity_type = 'WFSA'
28
+ const result = await this.dataSource.query(`SELECT template_code, form_id
29
+ FROM frm_wf_action_resources_mapping
30
+ WHERE stg_act_mapping_id IN (
31
+ SELECT id
32
+ FROM frm_wf_stage_action_mapping
33
+ WHERE action_id = $1 AND entity_type = 'WFSA'
34
34
  )`, [actionData.id]);
35
35
  const templates = result
36
36
  .filter((t) => t.template_code !== null)
@@ -69,7 +69,7 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
69
69
  await super.createEntity(resourceMapping, loggedInUser);
70
70
  }
71
71
  }
72
- await this.dataSource.query(`DELETE FROM frm_wf_action_resources_mapping WHERE stg_act_mapping_id = ? AND type = 'form'`, [stageActionMappingData.id]);
72
+ await this.dataSource.query(`DELETE FROM frm_wf_action_resources_mapping WHERE stg_act_mapping_id = $1 AND type = 'form'`, [stageActionMappingData.id]);
73
73
  if (actionData.form) {
74
74
  const resourceMapping = {
75
75
  stg_act_mapping_id: stageActionMappingData.id,
@@ -89,7 +89,7 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
89
89
  if (!action) {
90
90
  throw new Error('Action not found or could not be updated');
91
91
  }
92
- const stageMapID = await this.dataSource.query(`SELECT id FROM frm_wf_stage_action_mapping WHERE action_id = ? AND entity_type = 'WFSA'`, [action.id]);
92
+ const stageMapID = await this.dataSource.query(`SELECT id FROM frm_wf_stage_action_mapping WHERE action_id = $1 AND entity_type = 'WFSA'`, [action.id]);
93
93
  let stageActionMappingData;
94
94
  if (stageMapID.length > 0) {
95
95
  const stageActionMapping = {
@@ -109,7 +109,7 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
109
109
  };
110
110
  stageActionMappingData = await super.createEntity(newStageMapping, loggedInUser);
111
111
  }
112
- await this.dataSource.query(`DELETE FROM frm_wf_action_resources_mapping WHERE stg_act_mapping_id = ? AND type = 'template'`, [stageActionMappingData.id]);
112
+ await this.dataSource.query(`DELETE FROM frm_wf_action_resources_mapping WHERE stg_act_mapping_id = $1 AND type = 'template'`, [stageActionMappingData.id]);
113
113
  if (Array.isArray(template) && template.length > 0) {
114
114
  for (let i = 0; i < template.length; i++) {
115
115
  const templateCode = template[i];
@@ -123,7 +123,7 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
123
123
  console.log(res);
124
124
  }
125
125
  }
126
- await this.dataSource.query(`DELETE FROM frm_wf_action_resources_mapping WHERE stg_act_mapping_id = ? AND type = 'form'`, [stageActionMappingData.id]);
126
+ await this.dataSource.query(`DELETE FROM frm_wf_action_resources_mapping WHERE stg_act_mapping_id = $1 AND type = 'form'`, [stageActionMappingData.id]);
127
127
  if (form) {
128
128
  const resourceMapping = {
129
129
  stg_act_mapping_id: stageActionMappingData.id,
@@ -136,9 +136,9 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
136
136
  return action;
137
137
  }
138
138
  async deleteEntity(entityType, id, loggedInUser) {
139
- await this.dataSource.query(`DELETE FROM frm_wf_action_template_mapping WHERE stg_act_mapping_id IN (SELECT
140
- id FROM frm_wf_stage_action_mapping WHERE action_id = ? AND entity_type = 'WFSA')`, [id]);
141
- await this.dataSource.query(`DELETE FROM frm_wf_stage_action_mapping WHERE action_id = ? AND entity_type ='WFSA'`, [id]);
139
+ await this.dataSource.query(`DELETE FROM frm_wf_action_template_mapping WHERE stg_act_mapping_id IN (SELECT
140
+ id FROM frm_wf_stage_action_mapping WHERE action_id = $1 AND entity_type = 'WFSA')`, [id]);
141
+ await this.dataSource.query(`DELETE FROM frm_wf_stage_action_mapping WHERE action_id = $1 AND entity_type ='WFSA'`, [id]);
142
142
  const deleteAction = await super.deleteEntity(entityType, id, loggedInUser);
143
143
  return deleteAction;
144
144
  }
@@ -1 +1 @@
1
- {"version":3,"file":"action.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiE;AAEjE,g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zB"}
1
+ {"version":3,"file":"action.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/action.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiE;AAEjE,gGAAwF;AAExF,qCAAgE;AAChE,uEAAmE;AAI5D,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,+CAAiB;IAClD,YACmB,UAAsB,EACtB,gBAAkC;QAEnD,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACtB,qBAAgB,GAAhB,gBAAgB,CAAkB;IAGrD,CAAC;IAED,KAAK,CAAC,aAAa,CACjB,UAAkB,EAClB,EAAU,EACV,YAAY;QAEZ,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC;QAE3E,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACxC;;;;;;KAMD,EACC,CAAC,UAAU,CAAC,EAAE,CAAC,CAChB,CAAC;QAEF,MAAM,SAAS,GAAG,MAAM;aACrB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,KAAK,IAAI,CAAC;aACvC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;QAE/B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC;QAEpD,OAAO;YACL,GAAG,UAAU;YACb,QAAQ,EAAE,SAAS;YACnB,IAAI,EAAE,IAAI,EAAE,OAAO,IAAI,IAAI;SAC5B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,UAAsB,EACtB,YAA6B,EAC7B,OAA8B,EAC9B,OAAgB;QAEhB,M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ACJ,CAAC;CACF,CAAA;AA7QY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAGoB,oBAAU;QACJ,oCAAgB;GAH1C,aAAa,CA6QzB"}
@@ -24,17 +24,17 @@ let EntityModificationService = class EntityModificationService extends entity_s
24
24
  if (!mapped_entity_type || !mapped_entity_id || !attribute_key) {
25
25
  throw new common_1.BadRequestException('Missing required modification data: mapped_entity_type, mapped_entity_id, or attribute_key');
26
26
  }
27
- const [entityMeta] = await this.dataSource.query(`
28
- SELECT db_table_name
29
- FROM frm_entity_master
30
- WHERE mapped_entity_type = ? AND organization_id = ?
27
+ const [entityMeta] = await this.dataSource.query(`
28
+ SELECT db_table_name
29
+ FROM frm_entity_master
30
+ WHERE mapped_entity_type = $1 AND organization_id = $2
31
31
  `, [mapped_entity_type, organization_id]);
32
32
  if (!entityMeta || !entityMeta.db_table_name) {
33
33
  throw new common_1.NotFoundException('Entity metadata not found in frm_entity_master');
34
34
  }
35
35
  const tableName = entityMeta.db_table_name;
36
- const [entityRow] = await this.dataSource.query(`
37
- SELECT * FROM ${tableName} WHERE id = ?
36
+ const [entityRow] = await this.dataSource.query(`
37
+ SELECT * FROM ${tableName} WHERE id = $1
38
38
  `, [mapped_entity_id]);
39
39
  if (!entityRow) {
40
40
  throw new common_1.NotFoundException(`No record found in ${tableName} with ID ${mapped_entity_id}`);
@@ -32,7 +32,7 @@ let PopulateWorkflowService = class PopulateWorkflowService extends entity_servi
32
32
  this.actionService = actionService;
33
33
  }
34
34
  async populateWorkflowData(organization_id, loggedInUser) {
35
- let statusRow = await this.dataSource.query(`SELECT * FROM frm_list_master_items WHERE code='STATUS_ACTIVE' AND organization_id = ?`, [organization_id]);
35
+ let statusRow = await this.dataSource.query(`SELECT * FROM frm_list_master_items WHERE code='STATUS_ACTIVE' AND organization_id = $1`, [organization_id]);
36
36
  if (statusRow.length === 0) {
37
37
  statusRow = await this.dataSource.query(`SELECT * FROM frm_list_master_items WHERE code='STATUS_ACTIVE' AND organization_id = -1`);
38
38
  }
@@ -75,7 +75,7 @@ let PopulateWorkflowService = class PopulateWorkflowService extends entity_servi
75
75
  entity_type: 'WRFW',
76
76
  status: statusValue,
77
77
  }, loggedInUser);
78
- await this.dataSource.query(`INSERT INTO frm_wf_level_mapping (workflow_id, mapped_level_id, mapped_level_type) VALUES (?, ?, ?)`, [newWf.id, organization_id, 'ORG']);
78
+ await this.dataSource.query(`INSERT INTO frm_wf_level_mapping (workflow_id, mapped_level_id, mapped_level_type) VALUES ($1, $2, $3)`, [newWf.id, organization_id, 'ORG']);
79
79
  workflowIdMap[id] = newWf.id;
80
80
  }
81
81
  const stageGroupIdMap = {};
@@ -109,11 +109,11 @@ let PopulateWorkflowService = class PopulateWorkflowService extends entity_servi
109
109
  }, loggedInUser);
110
110
  stageIdMap[id] = newStage.id;
111
111
  stageToStageGroupMap[id] = stage_group_id;
112
- const stageIds = await this.dataSource.query(`SELECT action_id FROM frm_wf_stage_action_mapping WHERE stage_id = ?`, [id]);
112
+ const stageIds = await this.dataSource.query(`SELECT action_id FROM frm_wf_stage_action_mapping WHERE stage_id = $1`, [id]);
113
113
  const actionIds = stageIds.map((item) => item.action_id);
114
114
  let actions = [];
115
115
  if (actionIds.length > 0) {
116
- actions = await this.dataSource.query(`SELECT * FROM frm_wf_action WHERE id IN (?)`, [actionIds]);
116
+ actions = await this.dataSource.query(`SELECT * FROM frm_wf_action WHERE id IN ($1)`, [actionIds]);
117
117
  }
118
118
  else {
119
119
  actions = [];
@@ -122,15 +122,15 @@ let PopulateWorkflowService = class PopulateWorkflowService extends entity_servi
122
122
  for (const row of actions) {
123
123
  const { id, created_date, modified_date, workflow_id, ...rest } = row;
124
124
  const newWorkflowId = workflowIdMap[workflow_id];
125
- const [oldIsMandatory] = await this.dataSource.query(`SELECT code FROM frm_list_master_items WHERE id = ?`, [rest.action_requirement]);
126
- const newIsMandatoryList = await this.dataSource.query(`SELECT id, code FROM frm_list_master_items WHERE organization_id = ? AND listtype = 'ACRQ'`, [organization_id]);
125
+ const [oldIsMandatory] = await this.dataSource.query(`SELECT code FROM frm_list_master_items WHERE id = $1`, [rest.action_requirement]);
126
+ const newIsMandatoryList = await this.dataSource.query(`SELECT id, code FROM frm_list_master_items WHERE organization_id = $1 AND listtype = 'ACRQ'`, [organization_id]);
127
127
  console.log(`Populating action for stage ${newStage.id} in workflow ${newWorkflowId}`);
128
128
  console.log(`Old is_mandatory code: ${oldIsMandatory?.code}`);
129
129
  console.log(`New is_mandatory list:`, newIsMandatoryList);
130
130
  const matchedNewMandatory = newIsMandatoryList.find((item) => item.code === oldIsMandatory?.code);
131
131
  console.log(`Matched new mandatory item:`, matchedNewMandatory);
132
- const formActionCategory = await this.dataSource.query(`SELECT id FROM frm_wf_action_category WHERE id = ? and is_form = 1`, [row.action_category]);
133
- const formViewMaster = await this.dataSource.query(`SELECT id FROM frm_entity_view WHERE code = "LEAD_FORM" and organization_id = ?`, [organization_id]);
132
+ const formActionCategory = await this.dataSource.query(`SELECT id FROM frm_wf_action_category WHERE id = $1 and is_form = 1`, [row.action_category]);
133
+ const formViewMaster = await this.dataSource.query(`SELECT id FROM frm_entity_view WHERE code = "LEAD_FORM" and organization_id = $1`, [organization_id]);
134
134
  await this.actionService.createEntity({
135
135
  ...rest,
136
136
  stage_id: newStage.id,
@@ -1 +1 @@
1
- {"version":3,"file":"populate-workflow.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/populate-workflow.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,qCAAqC;AACrC,sFAAiF;AACjF,2CAAoD;AACpD,gGAAwF;AACxF,yDAAqD;AAErD,+DAA0D;AAC1D,mDAA+C;AAC/C,qDAAiD;AAG1C,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,+CAAiB;IAC5D,YACmB,mBAAwC,EACxC,UAAsB,EAEtB,eAAgC,EAEhC,iBAAoC,EAEpC,YAA0B,EAE1B,aAA4B;QAE7C,KAAK,EAAE,CAAC;QAXS,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CAAA;IAEtB,WAAA,IAAA,eAAM,EAAC,eAAe,CAAC,CAAA;qCARc,2CAAmB;QAC5B,oBAAU;QAEL,kCAAe;QAEb,uCAAiB;QAEtB,4BAAY;QAEX,8BAAa;GAXpC,uBAAuB,CAkSnC"}
1
+ {"version":3,"file":"populate-workflow.service.js","sourceRoot":"","sources":["../../../../src/module/workflow/service/populate-workflow.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,qCAAqC;AACrC,sFAAiF;AACjF,2CAAoD;AACpD,gGAAwF;AACxF,yDAAqD;AAErD,+DAA0D;AAC1D,mDAA+C;AAC/C,qDAAiD;AAG1C,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,+CAAiB;IAC5D,YACmB,mBAAwC,EACxC,UAAsB,EAEtB,eAAgC,EAEhC,iBAAoC,EAEpC,YAA0B,EAE1B,aAA4B;QAE7C,KAAK,EAAE,CAAC;QAXS,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,eAAU,GAAV,UAAU,CAAY;QAEtB,oBAAe,GAAf,eAAe,CAAiB;QAEhC,sBAAiB,GAAjB,iBAAiB,CAAmB;QAEpC,iBAAY,GAAZ,YAAY,CAAc;QAE1B,kBAAa,GAAb,aAAa,CAAe;IAG/C,CAAC;IAwDD,KAAK,CAAC,oBAAoB,CAAC,eAAuB,EAAE,YAAsB;QACxE,IAAI,SAAS,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACzC,yFAAyF,EACzF,CAAC,eAAe,CAAC,CAClB,CAAC;QAEF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,SAAS,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACrC,yFAAyF,CAC1F,CAAC;QACJ,CAAC;QAED,MAAM,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAIrC,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,C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