rez_core 5.0.181 → 6.5.0

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 (431) hide show
  1. package/.claude/settings.local.json +26 -0
  2. package/.idea/250218_nodejs_core.iml +8 -11
  3. package/.idea/codeStyles/Project.xml +58 -58
  4. package/.idea/codeStyles/codeStyleConfig.xml +4 -4
  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 +1 -1
  10. package/.idea/misc.xml +6 -0
  11. package/.idea/modules.xml +7 -7
  12. package/.idea/prettier.xml +5 -5
  13. package/.idea/vcs.xml +5 -5
  14. package/.prettierrc +3 -3
  15. package/README.md +99 -99
  16. package/dist/module/auth/guards/role.guard.js +3 -3
  17. package/dist/module/enterprise/controller/enterprise.controller.d.ts +12 -0
  18. package/dist/module/enterprise/controller/enterprise.controller.js +57 -0
  19. package/dist/module/enterprise/controller/enterprise.controller.js.map +1 -0
  20. package/dist/module/enterprise/controller/organization.controller.d.ts +11 -1
  21. package/dist/module/enterprise/controller/organization.controller.js +62 -2
  22. package/dist/module/enterprise/controller/organization.controller.js.map +1 -1
  23. package/dist/module/enterprise/enterprise.module.js +2 -1
  24. package/dist/module/enterprise/enterprise.module.js.map +1 -1
  25. package/dist/module/enterprise/entity/enterprise.entity.d.ts +1 -3
  26. package/dist/module/enterprise/entity/enterprise.entity.js +4 -12
  27. package/dist/module/enterprise/entity/enterprise.entity.js.map +1 -1
  28. package/dist/module/enterprise/entity/organization.entity.d.ts +1 -17
  29. package/dist/module/enterprise/entity/organization.entity.js +4 -72
  30. package/dist/module/enterprise/entity/organization.entity.js.map +1 -1
  31. package/dist/module/enterprise/repository/enterprise.repository.d.ts +2 -2
  32. package/dist/module/enterprise/repository/enterprise.repository.js +9 -4
  33. package/dist/module/enterprise/repository/enterprise.repository.js.map +1 -1
  34. package/dist/module/enterprise/service/enterprise.service.d.ts +2 -2
  35. package/dist/module/enterprise/service/enterprise.service.js +4 -4
  36. package/dist/module/enterprise/service/enterprise.service.js.map +1 -1
  37. package/dist/module/enterprise/service/organization.service.d.ts +2 -2
  38. package/dist/module/enterprise/service/organization.service.js +97 -20
  39. package/dist/module/enterprise/service/organization.service.js.map +1 -1
  40. package/dist/module/filter/entity/saved-filter-master.entity.d.ts +1 -0
  41. package/dist/module/filter/entity/saved-filter-master.entity.js +4 -0
  42. package/dist/module/filter/entity/saved-filter-master.entity.js.map +1 -1
  43. package/dist/module/filter/repository/saved-filter.repository.js +2 -0
  44. package/dist/module/filter/repository/saved-filter.repository.js.map +1 -1
  45. package/dist/module/filter/service/filter.service.js +19 -19
  46. package/dist/module/integration/examples/usage.example.js +9 -9
  47. package/dist/module/meta/repository/attribute-master.repository.js +8 -8
  48. package/dist/module/meta/service/entity-dynamic.service.js +16 -16
  49. package/dist/module/meta/service/media-data.service.js +6 -6
  50. package/dist/module/meta/service/resolver.service.js +11 -11
  51. package/dist/module/module/repository/menu.repository.js +4 -4
  52. package/dist/module/notification/service/notification.service.js +6 -6
  53. package/dist/module/user/controller/login.controller.js +18 -18
  54. package/dist/module/workflow/repository/action.repository.js +2 -2
  55. package/dist/module/workflow/repository/stage.repository.js +8 -8
  56. package/dist/module/workflow/service/action-template-mapping.service.js +2 -2
  57. package/dist/module/workflow/service/action.service.js +5 -5
  58. package/dist/module/workflow/service/entity-modification.service.js +2 -2
  59. package/dist/module/workflow/service/task.service.js +8 -8
  60. package/dist/module/workflow-automation/service/schedule-handler.service.js +9 -9
  61. package/dist/table.config.d.ts +1 -2
  62. package/dist/tsconfig.build.tsbuildinfo +1 -1
  63. package/dist/utils/service/reflection-helper.service.js +2 -2
  64. package/docs/modules/event-driven-integration-design.md +91 -91
  65. package/docs/modules/integration.md +250 -250
  66. package/eslint.config.mjs +34 -34
  67. package/nest-cli.json +14 -14
  68. package/package.json +125 -125
  69. package/server.log +850 -0
  70. package/src/app.controller.ts +12 -12
  71. package/src/app.module.ts +68 -68
  72. package/src/app.service.ts +8 -8
  73. package/src/config/bull.config.ts +69 -69
  74. package/src/config/config.module.ts +17 -17
  75. package/src/config/database.config.ts +48 -48
  76. package/src/constant/global.constant.ts +67 -67
  77. package/src/core.module.ts +94 -94
  78. package/src/decorators/roles.decorator.ts +7 -7
  79. package/src/dtos/response.dto.ts +6 -6
  80. package/src/dtos/response.ts +5 -5
  81. package/src/index.ts +1 -1
  82. package/src/module/auth/auth.module.ts +49 -49
  83. package/src/module/auth/controller/auth.controller.ts +28 -28
  84. package/src/module/auth/guards/google-auth.guard.ts +9 -9
  85. package/src/module/auth/guards/jwt.guard.ts +22 -22
  86. package/src/module/auth/guards/role.guard.ts +68 -68
  87. package/src/module/auth/services/auth.service.ts +56 -56
  88. package/src/module/auth/services/jwt.service.ts +11 -11
  89. package/src/module/auth/strategies/google.strategy.ts +54 -54
  90. package/src/module/auth/strategies/jwt.strategy.ts +58 -58
  91. package/src/module/auth/strategies/local.strategy.ts +13 -13
  92. package/src/module/dashboard/controller/dashboard.controller.ts +38 -38
  93. package/src/module/dashboard/dashboard.module.ts +21 -21
  94. package/src/module/dashboard/entity/dashboard_page_data.entity.ts +27 -27
  95. package/src/module/dashboard/entity/widget_master.entity.ts +18 -18
  96. package/src/module/dashboard/repository/dashboard.repository.ts +49 -49
  97. package/src/module/dashboard/service/dashboard.service.ts +72 -72
  98. package/src/module/enterprise/controller/enterprise.controller.ts +40 -0
  99. package/src/module/enterprise/controller/organization.controller.ts +93 -36
  100. package/src/module/enterprise/enterprise.module.ts +46 -45
  101. package/src/module/enterprise/entity/enterprise.entity.ts +31 -37
  102. package/src/module/enterprise/entity/organization-app-mapping.entity.ts +13 -13
  103. package/src/module/enterprise/entity/organization.entity.ts +40 -92
  104. package/src/module/enterprise/repository/enterprise.repository.ts +39 -31
  105. package/src/module/enterprise/repository/organization.repository.ts +26 -26
  106. package/src/module/enterprise/repository/school.repository.ts +272 -272
  107. package/src/module/enterprise/service/brand.service.ts +5 -5
  108. package/src/module/enterprise/service/enterprise.service.ts +22 -16
  109. package/src/module/enterprise/service/organization-app-mapping.service.ts +4 -4
  110. package/src/module/enterprise/service/organization.service.ts +262 -145
  111. package/src/module/entity_json/controller/entity_json.controller.ts +47 -47
  112. package/src/module/entity_json/entity/entityJson.entity.ts +39 -39
  113. package/src/module/entity_json/entity_json.module.ts +18 -18
  114. package/src/module/entity_json/service/entityJson.repository.ts +37 -37
  115. package/src/module/entity_json/service/entity_json.service.ts +241 -241
  116. package/src/module/export/controller/export.controller.ts +83 -83
  117. package/src/module/export/export.module.ts +14 -14
  118. package/src/module/export/service/export.service.ts +105 -105
  119. package/src/module/filter/controller/filter.controller.ts +87 -87
  120. package/src/module/filter/dto/filter-request.dto.ts +39 -39
  121. package/src/module/filter/entity/saved-filter-detail.entity.ts +41 -41
  122. package/src/module/filter/entity/saved-filter-master.entity.ts +35 -32
  123. package/src/module/filter/filter.module.ts +33 -33
  124. package/src/module/filter/repository/saved-filter.repository.ts +247 -258
  125. package/src/module/filter/repository/saved.filter-detail.repository.ts +19 -19
  126. package/src/module/filter/service/filter-evaluator.service.ts +82 -82
  127. package/src/module/filter/service/filter.service.ts +1316 -1316
  128. package/src/module/filter/service/saved-filter.service.ts +164 -164
  129. package/src/module/ics/controller/ics.controller.ts +21 -21
  130. package/src/module/ics/dto/ics.dto.ts +55 -55
  131. package/src/module/ics/ics.module.ts +13 -13
  132. package/src/module/ics/service/ics.service.ts +57 -57
  133. package/src/module/integration/controller/calender-event.controller.ts +31 -31
  134. package/src/module/integration/controller/integration.controller.ts +662 -662
  135. package/src/module/integration/controller/wrapper.controller.ts +37 -37
  136. package/src/module/integration/dto/create-config.dto.ts +526 -526
  137. package/src/module/integration/entity/integration-config.entity.ts +112 -112
  138. package/src/module/integration/entity/integration-entity-mapper.entity.ts +14 -14
  139. package/src/module/integration/entity/integration-source.entity.ts +17 -17
  140. package/src/module/integration/entity/user-integration.entity.ts +71 -71
  141. package/src/module/integration/examples/usage.example.ts +338 -338
  142. package/src/module/integration/factories/base.factory.ts +7 -7
  143. package/src/module/integration/factories/email.factory.ts +49 -49
  144. package/src/module/integration/factories/integration.factory.ts +121 -121
  145. package/src/module/integration/factories/sms.factory.ts +51 -51
  146. package/src/module/integration/factories/telephone.factory.ts +41 -41
  147. package/src/module/integration/factories/whatsapp.factory.ts +56 -56
  148. package/src/module/integration/integration.module.ts +110 -110
  149. package/src/module/integration/service/calendar-event.service.ts +118 -118
  150. package/src/module/integration/service/integration-entity-mapper.service.ts +17 -17
  151. package/src/module/integration/service/integration-queue.service.ts +229 -229
  152. package/src/module/integration/service/integration.service.ts +2634 -2634
  153. package/src/module/integration/service/oauth.service.ts +224 -224
  154. package/src/module/integration/service/wrapper.service.ts +753 -753
  155. package/src/module/integration/strategies/email/gmail-api.strategy.ts +280 -280
  156. package/src/module/integration/strategies/email/outlook-api.strategy.ts +44 -44
  157. package/src/module/integration/strategies/email/outlook.strategy.ts +64 -64
  158. package/src/module/integration/strategies/email/sendgrid-api.strategy.ts +260 -260
  159. package/src/module/integration/strategies/integration.strategy.ts +97 -97
  160. package/src/module/integration/strategies/sms/gupshup-sms.strategy.ts +146 -146
  161. package/src/module/integration/strategies/sms/msg91-sms.strategy.ts +164 -164
  162. package/src/module/integration/strategies/sms/tubelight-sms.strategy.ts +163 -163
  163. package/src/module/integration/strategies/telephone/ozonetel-voice.strategy.ts +238 -238
  164. package/src/module/integration/strategies/telephone/tubelight-voice.strategy.ts +210 -210
  165. package/src/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.ts +359 -359
  166. package/src/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.ts +372 -372
  167. package/src/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.ts +403 -403
  168. package/src/module/integration/strategies/whatsapp/whatsapp.strategy.ts +57 -57
  169. package/src/module/layout/controller/layout.controller.ts +47 -47
  170. package/src/module/layout/entity/header-items.entity.ts +28 -28
  171. package/src/module/layout/entity/header-section.entity.ts +19 -19
  172. package/src/module/layout/layout.module.ts +21 -21
  173. package/src/module/layout/repository/header-items.repository.ts +18 -18
  174. package/src/module/layout/repository/header-section.repository.ts +22 -22
  175. package/src/module/layout/service/header-section.service.ts +25 -25
  176. package/src/module/layout_preference/controller/layout_preference.controller.ts +76 -76
  177. package/src/module/layout_preference/entity/layout_preference.entity.ts +28 -28
  178. package/src/module/layout_preference/layout_preference.module.ts +22 -22
  179. package/src/module/layout_preference/repository/layout_preference.repository.ts +65 -65
  180. package/src/module/layout_preference/service/layout_preference.service.ts +191 -191
  181. package/src/module/lead/controller/lead.controller.ts +30 -30
  182. package/src/module/lead/lead.module.ts +14 -14
  183. package/src/module/lead/repository/lead.repository.ts +41 -41
  184. package/src/module/lead/service/lead.service.ts +54 -54
  185. package/src/module/linked_attributes/controller/linked_attributes.controller.ts +37 -37
  186. package/src/module/linked_attributes/entity/linked_attribute.entity.ts +51 -51
  187. package/src/module/linked_attributes/linked_attributes.module.ts +16 -16
  188. package/src/module/linked_attributes/repository/linked_attribute.repository.ts +12 -12
  189. package/src/module/linked_attributes/service/linked_attributes.service.ts +73 -73
  190. package/src/module/listmaster/controller/list-master.controller.ts +230 -230
  191. package/src/module/listmaster/entity/list-master-items.entity.ts +43 -43
  192. package/src/module/listmaster/entity/list-master.entity.ts +33 -33
  193. package/src/module/listmaster/listmaster.module.ts +46 -46
  194. package/src/module/listmaster/repository/list-master-items.repository.ts +173 -173
  195. package/src/module/listmaster/repository/list-master.repository.ts +56 -56
  196. package/src/module/listmaster/service/list-master-engine.ts +19 -19
  197. package/src/module/listmaster/service/list-master-extension.interface.ts +4 -4
  198. package/src/module/listmaster/service/list-master-item.service.ts +280 -280
  199. package/src/module/listmaster/service/list-master-registry.ts +15 -15
  200. package/src/module/listmaster/service/list-master.service.ts +527 -527
  201. package/src/module/mapper/controller/field-mapper.controller.ts +76 -76
  202. package/src/module/mapper/controller/mapper.controller.ts +20 -20
  203. package/src/module/mapper/dto/field-mapper.dto.ts +14 -14
  204. package/src/module/mapper/entity/field-lovs.entity.ts +19 -19
  205. package/src/module/mapper/entity/field-mapper.entity.ts +53 -53
  206. package/src/module/mapper/entity/mapper.entity.ts +16 -16
  207. package/src/module/mapper/mapper.module.ts +35 -35
  208. package/src/module/mapper/repository/field-lovs.repository.ts +35 -35
  209. package/src/module/mapper/repository/field-mapper.repository.ts +42 -42
  210. package/src/module/mapper/repository/mapper.repository.ts +32 -32
  211. package/src/module/mapper/service/field-mapper.service.ts +269 -269
  212. package/src/module/mapper/service/mapper.service.ts +80 -80
  213. package/src/module/master/controller/master.controller.ts +74 -74
  214. package/src/module/master/service/master.service.ts +484 -484
  215. package/src/module/meta/controller/app-master.controller.ts +38 -38
  216. package/src/module/meta/controller/attribute-master.controller.ts +84 -84
  217. package/src/module/meta/controller/entity-dynamic.controller.ts +125 -125
  218. package/src/module/meta/controller/entity-master.controller.ts +41 -41
  219. package/src/module/meta/controller/entity-relation.controller.ts +36 -36
  220. package/src/module/meta/controller/entity.controller.ts +308 -308
  221. package/src/module/meta/controller/entity.public.controller.ts +75 -75
  222. package/src/module/meta/controller/media.controller.ts +135 -135
  223. package/src/module/meta/controller/meta.controller.ts +101 -101
  224. package/src/module/meta/controller/view-master.controller.ts +79 -79
  225. package/src/module/meta/dto/entity-list-data.dto.ts +6 -6
  226. package/src/module/meta/dto/entity-tab.dto.ts +4 -4
  227. package/src/module/meta/dto/entity-table.dto.ts +12 -12
  228. package/src/module/meta/entity/app-master.entity.ts +37 -37
  229. package/src/module/meta/entity/attribute-master.entity.ts +92 -92
  230. package/src/module/meta/entity/base-entity.entity.ts +75 -75
  231. package/src/module/meta/entity/entity-master.entity.ts +85 -85
  232. package/src/module/meta/entity/entity-relation-data.entity.ts +29 -29
  233. package/src/module/meta/entity/entity-relation.entity.ts +23 -23
  234. package/src/module/meta/entity/entity-table-column.entity.ts +61 -61
  235. package/src/module/meta/entity/entity-table.entity.ts +50 -50
  236. package/src/module/meta/entity/media-data.entity.ts +32 -32
  237. package/src/module/meta/entity/preference.entity.ts +62 -62
  238. package/src/module/meta/entity/view-master.entity.ts +41 -41
  239. package/src/module/meta/entity.module.ts +165 -165
  240. package/src/module/meta/repository/app-master.repository.ts +20 -20
  241. package/src/module/meta/repository/attribute-master.repository.ts +164 -164
  242. package/src/module/meta/repository/entity-attribute-update.repository.ts +48 -48
  243. package/src/module/meta/repository/entity-master.repository.ts +120 -120
  244. package/src/module/meta/repository/entity-relation.repository.ts +22 -22
  245. package/src/module/meta/repository/entity-table-column.repository.ts +39 -39
  246. package/src/module/meta/repository/entity-table.repository.ts +53 -53
  247. package/src/module/meta/repository/media-data.repository.ts +50 -50
  248. package/src/module/meta/repository/preference.repository.ts +20 -20
  249. package/src/module/meta/repository/user-app-mapping.repository.ts +28 -28
  250. package/src/module/meta/repository/view-master.repository.ts +42 -42
  251. package/src/module/meta/service/app-master.service.ts +37 -37
  252. package/src/module/meta/service/attribute-master.service.ts +132 -132
  253. package/src/module/meta/service/common.service.ts +9 -9
  254. package/src/module/meta/service/entity-attribute-update.service.ts +26 -26
  255. package/src/module/meta/service/entity-dynamic.service.ts +824 -824
  256. package/src/module/meta/service/entity-master.service.ts +171 -171
  257. package/src/module/meta/service/entity-realation-data.service.ts +9 -9
  258. package/src/module/meta/service/entity-relation.service.ts +74 -74
  259. package/src/module/meta/service/entity-service-impl.service.ts +388 -388
  260. package/src/module/meta/service/entity-table-column.service.ts +26 -26
  261. package/src/module/meta/service/entity-table.service.ts +157 -157
  262. package/src/module/meta/service/entity-validation.service.ts +188 -188
  263. package/src/module/meta/service/entity.service.ts +49 -49
  264. package/src/module/meta/service/field-group.service.ts +103 -103
  265. package/src/module/meta/service/media-data.service.ts +591 -591
  266. package/src/module/meta/service/populate-meta.service.ts +222 -222
  267. package/src/module/meta/service/preference.service.ts +16 -16
  268. package/src/module/meta/service/resolver.service.ts +280 -280
  269. package/src/module/meta/service/section-master.service.ts +104 -104
  270. package/src/module/meta/service/update-form-json.service.ts +22 -22
  271. package/src/module/meta/service/user-app-mapping.service.ts +17 -17
  272. package/src/module/meta/service/view-master.service.ts +127 -127
  273. package/src/module/microservice-client/microservice-clients.module.ts +13 -13
  274. package/src/module/microservice-client/service/microservice-client-factory.ts +37 -37
  275. package/src/module/microservice-client/service/microservice-clients.ts +4 -4
  276. package/src/module/module/controller/menu.controller.ts +15 -15
  277. package/src/module/module/controller/module-access.controller.ts +133 -133
  278. package/src/module/module/entity/menu.entity.ts +43 -43
  279. package/src/module/module/entity/module-access.entity.ts +25 -25
  280. package/src/module/module/entity/module-action.entity.ts +17 -17
  281. package/src/module/module/entity/module.entity.ts +52 -52
  282. package/src/module/module/module.module.ts +42 -42
  283. package/src/module/module/repository/menu.repository.ts +186 -186
  284. package/src/module/module/repository/module-access.repository.ts +344 -344
  285. package/src/module/module/service/menu.service.ts +82 -82
  286. package/src/module/module/service/module-access.service.ts +189 -189
  287. package/src/module/notification/controller/notification.controller.ts +58 -58
  288. package/src/module/notification/controller/otp.controller.ts +117 -117
  289. package/src/module/notification/entity/notification.entity.ts +26 -26
  290. package/src/module/notification/entity/otp.entity.ts +28 -28
  291. package/src/module/notification/firebase-admin.config.ts +22 -22
  292. package/src/module/notification/notification.module.ts +69 -69
  293. package/src/module/notification/repository/otp.repository.ts +27 -27
  294. package/src/module/notification/service/email.service.ts +127 -127
  295. package/src/module/notification/service/notification.service.ts +164 -164
  296. package/src/module/notification/service/otp.service.ts +133 -133
  297. package/src/module/third-party-module/entity/third-party-api-registry.entity.ts +52 -52
  298. package/src/module/third-party-module/repository/third-party-api-registry.repository.ts +20 -20
  299. package/src/module/third-party-module/service/api-registry.service.ts +13 -13
  300. package/src/module/third-party-module/third-party.module.ts +12 -12
  301. package/src/module/user/controller/login.controller.ts +198 -198
  302. package/src/module/user/controller/user.controller.ts +40 -40
  303. package/src/module/user/dto/create-user.dto.ts +62 -62
  304. package/src/module/user/dto/update-user.dto.ts +4 -4
  305. package/src/module/user/entity/role.entity.ts +33 -33
  306. package/src/module/user/entity/user-role-mapping.entity.ts +38 -38
  307. package/src/module/user/entity/user-session.entity.ts +73 -73
  308. package/src/module/user/entity/user.entity.ts +62 -62
  309. package/src/module/user/repository/role.repository.ts +96 -96
  310. package/src/module/user/repository/user-role-mapping.repository.ts +126 -126
  311. package/src/module/user/repository/user.repository.ts +50 -50
  312. package/src/module/user/repository/userSession.repository.ts +33 -33
  313. package/src/module/user/service/login.service.ts +326 -326
  314. package/src/module/user/service/role.service.ts +197 -197
  315. package/src/module/user/service/user-role-mapping.service.ts +98 -98
  316. package/src/module/user/service/user-session.service.ts +200 -200
  317. package/src/module/user/service/user.service.ts +368 -368
  318. package/src/module/user/user.module.ts +65 -65
  319. package/src/module/workflow/controller/action-category.controller.ts +54 -54
  320. package/src/module/workflow/controller/action-resource-mapping.controller.ts +23 -23
  321. package/src/module/workflow/controller/action-template-mapping.controller.ts +35 -35
  322. package/src/module/workflow/controller/action.controller.ts +111 -111
  323. package/src/module/workflow/controller/activity-log.controller.ts +55 -55
  324. package/src/module/workflow/controller/comm-template.controller.ts +43 -43
  325. package/src/module/workflow/controller/entity-modification.controller.ts +35 -35
  326. package/src/module/workflow/controller/form-master.controller.ts +43 -43
  327. package/src/module/workflow/controller/stage-group.controller.ts +49 -49
  328. package/src/module/workflow/controller/stage.controller.ts +51 -51
  329. package/src/module/workflow/controller/task.controller.ts +77 -77
  330. package/src/module/workflow/controller/workflow-list-master.controller.ts +44 -44
  331. package/src/module/workflow/controller/workflow-meta.controller.ts +80 -80
  332. package/src/module/workflow/controller/workflow.controller.ts +67 -67
  333. package/src/module/workflow/entity/action-category.entity.ts +38 -38
  334. package/src/module/workflow/entity/action-data.entity.ts +55 -55
  335. package/src/module/workflow/entity/action-resources-mapping.entity.ts +29 -29
  336. package/src/module/workflow/entity/action-template-mapping.entity.ts +17 -17
  337. package/src/module/workflow/entity/action.entity.ts +53 -53
  338. package/src/module/workflow/entity/activity-log.entity.ts +43 -43
  339. package/src/module/workflow/entity/comm-template.entity.ts +43 -43
  340. package/src/module/workflow/entity/entity-modification.entity.ts +38 -38
  341. package/src/module/workflow/entity/form.entity.ts +25 -25
  342. package/src/module/workflow/entity/stage-action-mapping.entity.ts +17 -17
  343. package/src/module/workflow/entity/stage-group.entity.ts +23 -23
  344. package/src/module/workflow/entity/stage-movement-data.entity.ts +38 -38
  345. package/src/module/workflow/entity/stage.entity.ts +20 -20
  346. package/src/module/workflow/entity/task-data.entity.ts +88 -88
  347. package/src/module/workflow/entity/template-attach-mapper.entity.ts +30 -30
  348. package/src/module/workflow/entity/workflow-data.entity.ts +11 -11
  349. package/src/module/workflow/entity/workflow-level-mapping.entity.ts +18 -18
  350. package/src/module/workflow/entity/workflow.entity.ts +20 -20
  351. package/src/module/workflow/repository/action-category.repository.ts +79 -79
  352. package/src/module/workflow/repository/action-data.repository.ts +347 -347
  353. package/src/module/workflow/repository/action.repository.ts +339 -339
  354. package/src/module/workflow/repository/activity-log.repository.ts +148 -148
  355. package/src/module/workflow/repository/comm-template.repository.ts +157 -157
  356. package/src/module/workflow/repository/form-master.repository.ts +50 -50
  357. package/src/module/workflow/repository/stage-group.repository.ts +186 -186
  358. package/src/module/workflow/repository/stage-movement.repository.ts +217 -217
  359. package/src/module/workflow/repository/stage.repository.ts +160 -160
  360. package/src/module/workflow/repository/task.repository.ts +154 -154
  361. package/src/module/workflow/repository/workflow.repository.ts +42 -42
  362. package/src/module/workflow/service/action-category.service.ts +33 -33
  363. package/src/module/workflow/service/action-data.service.ts +62 -62
  364. package/src/module/workflow/service/action-resources-mapping.service.ts +10 -10
  365. package/src/module/workflow/service/action-template-mapping.service.ts +137 -137
  366. package/src/module/workflow/service/action.service.ts +302 -302
  367. package/src/module/workflow/service/activity-log.service.ts +107 -107
  368. package/src/module/workflow/service/comm-template.service.ts +181 -181
  369. package/src/module/workflow/service/entity-modification.service.ts +61 -61
  370. package/src/module/workflow/service/form-master.service.ts +35 -35
  371. package/src/module/workflow/service/populate-workflow.service.ts +320 -320
  372. package/src/module/workflow/service/stage-action-mapping.service.ts +5 -5
  373. package/src/module/workflow/service/stage-group.service.ts +325 -325
  374. package/src/module/workflow/service/stage.service.ts +197 -197
  375. package/src/module/workflow/service/task.service.ts +551 -551
  376. package/src/module/workflow/service/workflow-list-master.service.ts +68 -68
  377. package/src/module/workflow/service/workflow-meta.service.ts +640 -640
  378. package/src/module/workflow/service/workflow.service.ts +213 -213
  379. package/src/module/workflow/workflow.module.ts +180 -180
  380. package/src/module/workflow-automation/SCHEDULING_GUIDE.md +145 -145
  381. package/src/module/workflow-automation/controller/workflow-automation.controller.ts +43 -43
  382. package/src/module/workflow-automation/entity/workflow-automation-action.entity.ts +26 -26
  383. package/src/module/workflow-automation/entity/workflow-automation.entity.ts +40 -40
  384. package/src/module/workflow-automation/interface/action.decorator.ts +7 -7
  385. package/src/module/workflow-automation/interface/action.interface.ts +5 -5
  386. package/src/module/workflow-automation/service/action-registery.service.ts +35 -35
  387. package/src/module/workflow-automation/service/schedule-handler.service.ts +168 -168
  388. package/src/module/workflow-automation/service/workflow-automation-engine.service.ts +219 -219
  389. package/src/module/workflow-automation/service/workflow-automation.service.ts +476 -476
  390. package/src/module/workflow-automation/workflow-automation.module.ts +54 -54
  391. package/src/module/workflow-schedule/INSTALLATION.md +244 -244
  392. package/src/module/workflow-schedule/MULTI_PROJECT_GUIDE.md +196 -196
  393. package/src/module/workflow-schedule/README.md +422 -422
  394. package/src/module/workflow-schedule/constants/schedule.constants.ts +48 -48
  395. package/src/module/workflow-schedule/controller/workflow-schedule.controller.ts +253 -253
  396. package/src/module/workflow-schedule/docs/CLAUDE_CODE_GUIDE.md +510 -510
  397. package/src/module/workflow-schedule/docs/CLAUDE_CODE_PROMPT.md +362 -362
  398. package/src/module/workflow-schedule/docs/RUN_CLAUDE_CODE.sh +68 -68
  399. package/src/module/workflow-schedule/dto/create-schedule.dto.ts +147 -147
  400. package/src/module/workflow-schedule/dto/get-execution-logs.dto.ts +119 -119
  401. package/src/module/workflow-schedule/dto/update-schedule.dto.ts +96 -96
  402. package/src/module/workflow-schedule/entities/scheduled-workflow.entity.ts +148 -148
  403. package/src/module/workflow-schedule/entities/workflow-execution-log.entity.ts +154 -154
  404. package/src/module/workflow-schedule/interfaces/schedule-job-data.interface.ts +53 -53
  405. package/src/module/workflow-schedule/interfaces/workflow-schedule-options.interface.ts +12 -12
  406. package/src/module/workflow-schedule/processors/schedule.processor.ts +620 -620
  407. package/src/module/workflow-schedule/service/workflow-schedule.service.ts +597 -597
  408. package/src/module/workflow-schedule/workflow-schedule.module.ts +67 -67
  409. package/src/resources/dev.properties.yaml +31 -31
  410. package/src/resources/local.properties.yaml +27 -27
  411. package/src/resources/properties.module.ts +12 -12
  412. package/src/resources/properties.yaml.ts +11 -11
  413. package/src/resources/uat.properties.yaml +31 -31
  414. package/src/table.config.ts +133 -133
  415. package/src/utils/dto/excel-data.dto.ts +14 -14
  416. package/src/utils/dto/excelsheet-data.dto.ts +5 -5
  417. package/src/utils/service/base64util.service.ts +18 -18
  418. package/src/utils/service/clockIDGenUtil.service.ts +21 -21
  419. package/src/utils/service/codeGenerator.service.ts +22 -22
  420. package/src/utils/service/dateUtil.service.ts +17 -17
  421. package/src/utils/service/encryptUtil.service.ts +97 -97
  422. package/src/utils/service/excel-helper.service.ts +72 -72
  423. package/src/utils/service/excelUtil.service.ts +15 -15
  424. package/src/utils/service/file-util.service.ts +11 -11
  425. package/src/utils/service/json-util.service.ts +23 -23
  426. package/src/utils/service/loggingUtil.service.ts +88 -88
  427. package/src/utils/service/reflection-helper.service.ts +62 -62
  428. package/src/utils/service/wbsCodeGen.service.ts +8 -8
  429. package/src/utils/utils.module.ts +27 -27
  430. package/tsconfig.build.json +4 -4
  431. package/tsconfig.json +24 -24
@@ -7,5 +7,6 @@ export declare class SavedFilterMaster extends BaseEntity {
7
7
  filter_scope: 'FILTER' | 'RULE';
8
8
  is_shared: boolean;
9
9
  is_editable: boolean;
10
+ is_owner: boolean;
10
11
  description: string;
11
12
  }
@@ -44,6 +44,10 @@ __decorate([
44
44
  (0, typeorm_1.Column)({ type: 'boolean', default: false, nullable: true }),
45
45
  __metadata("design:type", Boolean)
46
46
  ], SavedFilterMaster.prototype, "is_editable", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: 'boolean', default: false, nullable: true }),
49
+ __metadata("design:type", Boolean)
50
+ ], SavedFilterMaster.prototype, "is_owner", void 0);
47
51
  __decorate([
48
52
  (0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
49
53
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"saved-filter-master.entity.js","sourceRoot":"","sources":["../../../../src/module/filter/entity/saved-filter-master.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA4E;AAC5E,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,+BAAU;IAC/C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,8CAA4B,CAAC;IAClD,CAAC;CAsBF,CAAA;AA1BY,8CAAiB;AAO5B;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6DAC7B;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACxB;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACxC;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDAC3C;AAGhC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACzC;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACvC;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACrC;4BAzBT,iBAAiB;IAD7B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;;GAC/B,iBAAiB,CA0B7B"}
1
+ {"version":3,"file":"saved-filter-master.entity.js","sourceRoot":"","sources":["../../../../src/module/filter/entity/saved-filter-master.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uEAA4E;AAC5E,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,+BAAU;IAC/C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,8CAA4B,CAAC;IAClD,CAAC;CAyBF,CAAA;AA7BY,8CAAiB;AAO5B;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6DAC7B;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACxB;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACxC;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDAC3C;AAGhC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACzC;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACvC;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAC1C;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACrC;4BA5BT,iBAAiB;IAD7B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;;GAC/B,iBAAiB,CA6B7B"}
@@ -98,6 +98,7 @@ let SavedFilterRepositoryService = class SavedFilterRepositoryService {
98
98
  if (filters?.length) {
99
99
  for (const filter of filters) {
100
100
  try {
101
+ filter.is_owner = true;
101
102
  const baseUrl = this.configService.get('REDIRECT_BE_URL');
102
103
  const queryParams = new URLSearchParams({
103
104
  loggedInUser: JSON.stringify(loggedInUser),
@@ -130,6 +131,7 @@ let SavedFilterRepositoryService = class SavedFilterRepositoryService {
130
131
  if (filters?.length) {
131
132
  for (const filter of filters) {
132
133
  try {
134
+ filter.is_owner = loggedInUser.id == filter.user_id ? true : false;
133
135
  const baseUrl = this.configService.get('REDIRECT_BE_URL');
134
136
  const queryParams = new URLSearchParams({
135
137
  loggedInUser: JSON.stringify(loggedInUser),
@@ -1 +1 @@
1
- {"version":3,"file":"saved-filter.repository.js","sourceRoot":"","sources":["../../../../src/module/filter/repository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e;YACvC,YAAY,EACV,MAAM,CAAC,SAAS,KAAK,aAAa;gBAChC,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE;oBAClC,CAAC,CAAC,EAAE;oBACJ,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC;gBAClC,CAAC,CAAC,MAAM,CAAC,YAAY;SAC1B,CAAC,CAAC,CAAC;IACN,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,IAAY,EACZ,YAAsB;QAEtB,MAAM,qBAAqB,GACzB,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;QAE5D,MAAM,YAAY,GAAG,MAAM,qBAAqB,CAAC,OAAO,CAAC;YACvD,KAAK,EAAE;gBACL,IAAI,EAAE,IAAI;gBACV,aAAa,EAAE,YAAY,CAAC,aAAa;aAC1C;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAErE,OAAO;YACL,GAAG,YAAY;YACf,aAAa;SACd,CAAC;IACJ,CAAC;CACF,CAAA;AAtPY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,8CAAiB,CAAC,CAAA;IAEnC,WAAA,IAAA,0BAAgB,EAAC,8CAAiB,CAAC,CAAA;qCADI,oBAAU;QAEV,oBAAU;QACf,4CAAgB;QACnB,sBAAa;GAPpC,4BAA4B,CAsPxC"}
1
+ {"version":3,"file":"saved-filter.repository.js","sourceRoot":"","sources":["../../../../src/module/filter/repository/saved-filter.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAA0C;AAC1C,qFAAyE;AACzE,qFA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AAM,CAAC,kBAAkB;YAC7C,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,YAAY,EACV,MAAM,CAAC,SAAS,KAAK,aAAa;gBAChC,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,EAAE;oBAClC,CAAC,CAAC,EAAE;oBACJ,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC;gBAClC,CAAC,CAAC,MAAM,CAAC,YAAY;SAC1B,CAAC,CAAC,CAAC;IACN,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,IAAY,EACZ,YAAsB;QAEtB,MAAM,qBAAqB,GACzB,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;QAE5D,MAAM,YAAY,GAAG,MAAM,qBAAqB,CAAC,OAAO,CAAC;YACvD,KAAK,EAAE;gBACL,IAAI,EAAE,IAAI;gBACV,aAAa,EAAE,YAAY,CAAC,aAAa;aAC1C;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAErE,OAAO;YACL,GAAG,YAAY;YACf,aAAa;SACd,CAAC;IACJ,CAAC;CACF,CAAA;AA3OY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,8CAAiB,CAAC,CAAA;IAEnC,WAAA,IAAA,0BAAgB,EAAC,8CAAiB,CAAC,CAAA;qCADI,oBAAU;QAEV,oBAAU;QACf,4CAAgB;QACnB,sBAAa;GAPpC,4BAA4B,CA2OxC"}
@@ -62,10 +62,10 @@ let FilterService = class FilterService {
62
62
  });
63
63
  whereSQL = `WHERE ${clauseParts.join(' AND ')}`;
64
64
  }
65
- const rawSQL = `
66
- SELECT ${column} AS tab_value, COUNT(*) AS tab_value_count
67
- FROM ${this.schema}.${tableName} ${whereSQL}
68
- GROUP BY ${column}
65
+ const rawSQL = `
66
+ SELECT ${column} AS tab_value, COUNT(*) AS tab_value_count
67
+ FROM ${this.schema}.${tableName} ${whereSQL}
68
+ GROUP BY ${column}
69
69
  `;
70
70
  const rows = await this.entityManager.query(rawSQL, values);
71
71
  const total = rows.reduce((sum, r) => sum + parseInt(r.tab_value_count, 10), 0);
@@ -179,21 +179,21 @@ let FilterService = class FilterService {
179
179
  }
180
180
  else if (level_type === 'SCH') {
181
181
  baseWhere.push({
182
- query: `
183
- (
184
- (e.level_type = 'SCH' AND e.level_id = '${loggedInUser.level_id}')
185
- OR
186
- (
187
- e.level_type = 'ORG'
188
- AND e.level_id = '${loggedInUser.enterprise_id}'
189
- AND e.enterprise_id = '${loggedInUser.enterprise_id}'
190
- AND e.code NOT IN (
191
- SELECT sub.code
192
- FROM frm_wf_comm_template AS sub
193
- WHERE sub.level_type = 'SCH' AND sub.level_id = '${loggedInUser.level_id}'
194
- )
195
- )
196
- )
182
+ query: `
183
+ (
184
+ (e.level_type = 'SCH' AND e.level_id = '${loggedInUser.level_id}')
185
+ OR
186
+ (
187
+ e.level_type = 'ORG'
188
+ AND e.level_id = '${loggedInUser.enterprise_id}'
189
+ AND e.enterprise_id = '${loggedInUser.enterprise_id}'
190
+ AND e.code NOT IN (
191
+ SELECT sub.code
192
+ FROM frm_wf_comm_template AS sub
193
+ WHERE sub.level_type = 'SCH' AND sub.level_id = '${loggedInUser.level_id}'
194
+ )
195
+ )
196
+ )
197
197
  `,
198
198
  params: {},
199
199
  });
@@ -104,15 +104,15 @@ class CommunicationUsageExamples {
104
104
  console.log('Gmail with attachments sent:', result);
105
105
  }
106
106
  async sendGmailWithTemplate() {
107
- const htmlTemplate = `
108
- <html>
109
- <body>
110
- <h2>Welcome {{userName}}!</h2>
111
- <p>Thank you for joining our platform.</p>
112
- <p>Your account ID is: {{accountId}}</p>
113
- <a href="{{verificationLink}}">Verify your email</a>
114
- </body>
115
- </html>
107
+ const htmlTemplate = `
108
+ <html>
109
+ <body>
110
+ <h2>Welcome {{userName}}!</h2>
111
+ <p>Thank you for joining our platform.</p>
112
+ <p>Your account ID is: {{accountId}}</p>
113
+ <a href="{{verificationLink}}">Verify your email</a>
114
+ </body>
115
+ </html>
116
116
  `;
117
117
  const result = await this.communicationService.sendGenericMessage({
118
118
  levelId: 1,
@@ -101,18 +101,18 @@ let AttributeMasterRepository = class AttributeMasterRepository {
101
101
  return null;
102
102
  }
103
103
  async checkIfColumnExists(tableName, columnName) {
104
- const result = await this.entityManger.query(`
105
- SELECT column_name
106
- FROM information_schema.columns
107
- WHERE table_name = $1
108
- AND column_name = $2
104
+ const result = await this.entityManger.query(`
105
+ SELECT column_name
106
+ FROM information_schema.columns
107
+ WHERE table_name = $1
108
+ AND column_name = $2
109
109
  `, [tableName, columnName]);
110
110
  return result.length > 0;
111
111
  }
112
112
  async addColumnToTable(tableName, columnName, columnType) {
113
- const alterQuery = `
114
- ALTER TABLE ${this.schema}.${tableName}
115
- ADD COLUMN IF NOT EXISTS ${columnName} ${columnType}
113
+ const alterQuery = `
114
+ ALTER TABLE ${this.schema}.${tableName}
115
+ ADD COLUMN IF NOT EXISTS ${columnName} ${columnType}
116
116
  `;
117
117
  await this.entityManger.query(alterQuery);
118
118
  }
@@ -58,7 +58,7 @@ let EntityDynamicService = class EntityDynamicService {
58
58
  entityData.status = statusList[0]?.id;
59
59
  const entityMaster = await this.entityMasterRepo.getEntityByMappedEntityType(entityType, loggedInUser.enterprise_id);
60
60
  if (!entityData.code && entityData.entity_type && entityMaster) {
61
- const result = this.entityManager.query(`SELECT MAX(id) as seq_no
61
+ const result = this.entityManager.query(`SELECT MAX(id) as seq_no
62
62
  FROM ${this.schema}.${entityMaster.db_table_name}`);
63
63
  let maxSeq = Number(result[0]?.max_seq_no) || 0;
64
64
  maxSeq++;
@@ -102,9 +102,9 @@ let EntityDynamicService = class EntityDynamicService {
102
102
  }
103
103
  const colList = columns.map((c) => `"${c}"`).join(', ');
104
104
  const placeholderList = placeholders.join(', ');
105
- const sql = `
106
- INSERT INTO ${this.schema}.${tableName} (${colList})
107
- VALUES (${placeholderList}) RETURNING id
105
+ const sql = `
106
+ INSERT INTO ${this.schema}.${tableName} (${colList})
107
+ VALUES (${placeholderList}) RETURNING id
108
108
  `;
109
109
  const result = await this.entityManager.query(sql, values);
110
110
  return result[0];
@@ -323,10 +323,10 @@ let EntityDynamicService = class EntityDynamicService {
323
323
  }
324
324
  const idPlaceholder = `$${idx}`;
325
325
  values.push(id);
326
- const updateQuery = `
327
- UPDATE ${this.schema}.${tableName}
328
- SET ${updates.join(', ')}
329
- WHERE id = ${idPlaceholder}
326
+ const updateQuery = `
327
+ UPDATE ${this.schema}.${tableName}
328
+ SET ${updates.join(', ')}
329
+ WHERE id = ${idPlaceholder}
330
330
  `;
331
331
  return await this.entityManager.query(updateQuery, values);
332
332
  }
@@ -337,8 +337,8 @@ let EntityDynamicService = class EntityDynamicService {
337
337
  const columns = validAttributes
338
338
  .map((attr) => `${attr.attribute_key}`)
339
339
  .join(', ');
340
- const selectQuery = `SELECT ${columns}
341
- FROM ${dataSource}
340
+ const selectQuery = `SELECT ${columns}
341
+ FROM ${dataSource}
342
342
  WHERE id = $1`;
343
343
  const result = await this.entityManager.query(selectQuery, [id]);
344
344
  if (!result.length)
@@ -366,8 +366,8 @@ let EntityDynamicService = class EntityDynamicService {
366
366
  return null;
367
367
  const validAttributes = await this.getAttributeCodes(entityType, enterprise_id);
368
368
  const columns = validAttributes.map(attr => `t.${attr.attribute_key}`);
369
- const selectQuery = `SELECT ${columns}
370
- FROM ${this.schema}.${entityMaster.db_table_name} t
369
+ const selectQuery = `SELECT ${columns}
370
+ FROM ${this.schema}.${entityMaster.db_table_name} t
371
371
  WHERE id = $1`;
372
372
  const result = await this.entityManager.query(selectQuery, [id]);
373
373
  if (!result.length)
@@ -429,8 +429,8 @@ let EntityDynamicService = class EntityDynamicService {
429
429
  async deleteEntity(entityType, id, loggedInUser) {
430
430
  const enterprise_id = loggedInUser.enterprise_id;
431
431
  const tableName = await this.getTableName(entityType, enterprise_id);
432
- const deleteQuery = `DELETE
433
- FROM ${this.schema}.${tableName}
432
+ const deleteQuery = `DELETE
433
+ FROM ${this.schema}.${tableName}
434
434
  WHERE id = $1`;
435
435
  const result = await this.entityManager.query(deleteQuery, [id]);
436
436
  return result;
@@ -451,8 +451,8 @@ let EntityDynamicService = class EntityDynamicService {
451
451
  throw new Error(`Entity type '${entityType}' not found in frm_entity_master for enterprise '${enterprise_id}'`);
452
452
  }
453
453
  const tableName = result.db_table_name;
454
- const seqResult = await this.entityManager.query(`SELECT MAX(id) AS max_seq_no
455
- FROM ${tableName}
454
+ const seqResult = await this.entityManager.query(`SELECT MAX(id) AS max_seq_no
455
+ FROM ${tableName}
456
456
  WHERE entity_type = $1`, [entityType]);
457
457
  let maxSeqNo = seqResult?.[0]?.max_seq_no
458
458
  ? Number(seqResult[0].max_seq_no)
@@ -201,8 +201,8 @@ let MediaDataService = class MediaDataService extends entity_service_impl_servic
201
201
  const getEntityData = await this.entityMasterService.getEntityData(levelEntityType, loggedInUser);
202
202
  if (!getEntityData)
203
203
  return null;
204
- const levelEntityDataResult = await this.entityManager.query(`SELECT *
205
- FROM ${getEntityData?.db_table_name}
204
+ const levelEntityDataResult = await this.entityManager.query(`SELECT *
205
+ FROM ${getEntityData?.db_table_name}
206
206
  WHERE id = $1`, [levelEntityId]);
207
207
  const levelEntityData = levelEntityDataResult[0] || null;
208
208
  if (levelEntityData?.code) {
@@ -223,8 +223,8 @@ let MediaDataService = class MediaDataService extends entity_service_impl_servic
223
223
  const getEntityData = await this.entityMasterService.getEntityData(mappedEntityType, loggedInUser);
224
224
  if (!getEntityData)
225
225
  return null;
226
- const levelEntityDataResult = await this.entityManager.query(`SELECT *
227
- FROM ${getEntityData?.db_table_name}
226
+ const levelEntityDataResult = await this.entityManager.query(`SELECT *
227
+ FROM ${getEntityData?.db_table_name}
228
228
  WHERE id = $1`, [mappedEntityId]);
229
229
  if (levelEntityDataResult?.[0].code &&
230
230
  parentType != 'SCH' &&
@@ -236,8 +236,8 @@ let MediaDataService = class MediaDataService extends entity_service_impl_servic
236
236
  const getEntityData = await this.entityMasterService.getEntityData(mappedEntityType, loggedInUser);
237
237
  if (!getEntityData)
238
238
  return null;
239
- const levelEntityDataResult = await this.entityManager.query(`SELECT *
240
- FROM ${getEntityData?.db_table_name}
239
+ const levelEntityDataResult = await this.entityManager.query(`SELECT *
240
+ FROM ${getEntityData?.db_table_name}
241
241
  WHERE id = $1`, [mappedEntityId]);
242
242
  replacements['template_code'] = levelEntityDataResult?.[0].code;
243
243
  pathTemplate = '${org_code}/${level_code}/template/${template_code}';
@@ -108,11 +108,11 @@ let ResolverService = class ResolverService {
108
108
  const resolvedValues = [];
109
109
  for (const value of rawValue) {
110
110
  const query = tableName === 'sso_organization'
111
- ? `SELECT *
112
- FROM ${tableName}
111
+ ? `SELECT *
112
+ FROM ${tableName}
113
113
  WHERE code = $1`
114
- : `SELECT *
115
- FROM ${tableName}
114
+ : `SELECT *
115
+ FROM ${tableName}
116
116
  WHERE id = $1`;
117
117
  const params = tableName === 'sso_organization'
118
118
  ? [value]
@@ -123,8 +123,8 @@ let ResolverService = class ResolverService {
123
123
  return resolvedValues;
124
124
  }
125
125
  else {
126
- const query = `SELECT *
127
- FROM ${tableName}
126
+ const query = `SELECT *
127
+ FROM ${tableName}
128
128
  WHERE id = $1`;
129
129
  const params = [rawValue];
130
130
  const [item] = await this.entityManger.query(query, params);
@@ -173,12 +173,12 @@ let ResolverService = class ResolverService {
173
173
  return displayValue;
174
174
  const tableName = entityDef.db_table_name;
175
175
  const query = tableName === 'sso_organization'
176
- ? `SELECT id
177
- FROM ${tableName}
176
+ ? `SELECT id
177
+ FROM ${tableName}
178
178
  WHERE ${attr.data_source_attribute} = $1`
179
- : `SELECT id
180
- FROM ${tableName}
181
- WHERE ${attr.data_source_attribute} = $1
179
+ : `SELECT id
180
+ FROM ${tableName}
181
+ WHERE ${attr.data_source_attribute} = $1
182
182
  AND enterprise_id = $2`;
183
183
  const params = tableName === 'sso_organization'
184
184
  ? [displayValue]
@@ -60,10 +60,10 @@ let MenuRepository = class MenuRepository extends typeorm_1.Repository {
60
60
  async getMenuItems(moduleCodes, appcode, levelType) {
61
61
  return await this.menuData
62
62
  .createQueryBuilder('menu')
63
- .leftJoin('sso_module', 'module', `
64
- menu.module_code = module.module_code
65
- AND LOWER(menu.appcode) = LOWER(module.appcode)
66
- AND menu.level_type = module.level_type
63
+ .leftJoin('sso_module', 'module', `
64
+ menu.module_code = module.module_code
65
+ AND LOWER(menu.appcode) = LOWER(module.appcode)
66
+ AND menu.level_type = module.level_type
67
67
  `)
68
68
  .where('menu.module_code IN (:...moduleCodes)', { moduleCodes })
69
69
  .andWhere('LOWER(menu.appcode) = LOWER(:appcode)', { appcode })
@@ -69,12 +69,12 @@ let NotificationsService = class NotificationsService {
69
69
  isReadFilter = isRead ? '1' : '0';
70
70
  }
71
71
  let paramIndex = 1;
72
- let sql = `
73
- SELECT n.*
74
- FROM frm_notification n
75
- WHERE n.user_id = $${paramIndex}
76
- AND n.level_id = $${paramIndex + 1}
77
- AND n.level_type = $${paramIndex + 2}
72
+ let sql = `
73
+ SELECT n.*
74
+ FROM frm_notification n
75
+ WHERE n.user_id = $${paramIndex}
76
+ AND n.level_id = $${paramIndex + 1}
77
+ AND n.level_type = $${paramIndex + 2}
78
78
  `;
79
79
  const params = [String(id), String(level_id), String(level_type)];
80
80
  paramIndex += 3;
@@ -58,27 +58,27 @@ let LoginController = class LoginController {
58
58
  try {
59
59
  const actualState = state.replace('gmail_config:', '');
60
60
  const result = await this.integrationService.handleGmailTokensCallback(email, googleAccessToken, googleRefreshToken, actualState);
61
- return res.send(`<html><body><script>
62
- window.opener.postMessage({ type: 'CONFIG_SUCCESS' }, '*');
63
- window.close();
61
+ return res.send(`<html><body><script>
62
+ window.opener.postMessage({ type: 'CONFIG_SUCCESS' }, '*');
63
+ window.close();
64
64
  </script> <p>Configuration successful. You can close this window.</p> </body></html>`);
65
65
  }
66
66
  catch (error) {
67
- return res.send(`
68
- <html>
69
- <body>
70
- <script>
71
- if (window.opener) {
72
- window.opener.postMessage({
73
- type: "CONFIG_FAILED",
74
- error: "${error.message || 'Something went wrong'}"
75
- }, "*");
76
- }
77
- window.close();
78
- </script>
79
- <p>Configuration failed. Please close this window.</p>
80
- </body>
81
- </html>
67
+ return res.send(`
68
+ <html>
69
+ <body>
70
+ <script>
71
+ if (window.opener) {
72
+ window.opener.postMessage({
73
+ type: "CONFIG_FAILED",
74
+ error: "${error.message || 'Something went wrong'}"
75
+ }, "*");
76
+ }
77
+ window.close();
78
+ </script>
79
+ <p>Configuration failed. Please close this window.</p>
80
+ </body>
81
+ </html>
82
82
  `);
83
83
  }
84
84
  }
@@ -114,8 +114,8 @@ let ActionRepository = class ActionRepository {
114
114
  ])
115
115
  .from('frm_wf_action', 'a')
116
116
  .leftJoin('frm_wf_action_category', 'ac', 'ac.id::text = a.action_category')
117
- .leftJoin('frm_list_master_items', 'ar', `ar.id::text = a.action_requirement
118
- AND ar.listtype = 'ACRQ'
117
+ .leftJoin('frm_list_master_items', 'ar', `ar.id::text = a.action_requirement
118
+ AND ar.listtype = 'ACRQ'
119
119
  AND ar.organization_id = :orgId`, { orgId: organization_id })
120
120
  .where('a.organization_id = :orgId', { orgId: organization_id })
121
121
  .andWhere('a.id::text IN (:...actionIds)', { actionIds })
@@ -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 = $1 AND g.enterprise_id = $2 AND g.id = $3
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.enterprise_id = $2 AND g.id = $3
72
+ ORDER BY g.id, s.id
73
73
  `, [stageGroup.workflow_id, enterprise_id, stage_group_id]);
74
74
  if (!rows || rows.length === 0) {
75
75
  return [];
@@ -108,8 +108,8 @@ let ActionTemplateMappingService = class ActionTemplateMappingService extends en
108
108
  'ct.name AS label',
109
109
  'ct.id AS id',
110
110
  ])
111
- .innerJoin('frm_list_master_items', 'fmi', `fmi.id = ct.status::bigint
112
- AND fmi.code = 'STATUS_ACTIVE'
111
+ .innerJoin('frm_list_master_items', 'fmi', `fmi.id = ct.status::bigint
112
+ AND fmi.code = 'STATUS_ACTIVE'
113
113
  AND fmi.enterprise_id::text = :entId`, { entId: String(loggedInUser.enterprise_id) })
114
114
  .where('ct.code IN (:...codes)', { codes: templateCodes })
115
115
  .andWhere('ct.mode::text = :mode', { mode: String(mode) })
@@ -165,11 +165,11 @@ let ActionService = class ActionService extends entity_service_impl_service_1.En
165
165
  await this.actionTemplateMappingRepository
166
166
  .createQueryBuilder()
167
167
  .delete()
168
- .where(`stg_act_mapping_id IN (
169
- SELECT sam.id
170
- FROM frm_wf_stage_action_mapping sam
171
- WHERE sam.action_id = :actionId
172
- AND sam.entity_type = 'WFSA'
168
+ .where(`stg_act_mapping_id IN (
169
+ SELECT sam.id
170
+ FROM frm_wf_stage_action_mapping sam
171
+ WHERE sam.action_id = :actionId
172
+ AND sam.entity_type = 'WFSA'
173
173
  )`)
174
174
  .setParameter('actionId', id)
175
175
  .execute();
@@ -29,8 +29,8 @@ let EntityModificationService = class EntityModificationService extends entity_s
29
29
  throw new common_1.NotFoundException('Entity metadata not found in frm_entity_master');
30
30
  }
31
31
  const tableName = entityMeta.db_table_name;
32
- const [entityRow] = await this.entityManager.query(`
33
- SELECT * FROM ${tableName} WHERE id = $1
32
+ const [entityRow] = await this.entityManager.query(`
33
+ SELECT * FROM ${tableName} WHERE id = $1
34
34
  `, [mapped_entity_id]);
35
35
  if (!entityRow) {
36
36
  throw new common_1.NotFoundException(`No record found in ${tableName} with ID ${mapped_entity_id}`);
@@ -227,14 +227,14 @@ let TaskService = class TaskService extends entity_service_impl_service_1.Entity
227
227
  });
228
228
  }
229
229
  if (overdue) {
230
- qb.andWhere(`
231
- (
232
- t.due_date < CURRENT_DATE
233
- OR (
234
- t.due_date = CURRENT_DATE
235
- AND t.due_time::time < CURRENT_TIME
236
- )
237
- )
230
+ qb.andWhere(`
231
+ (
232
+ t.due_date < CURRENT_DATE
233
+ OR (
234
+ t.due_date = CURRENT_DATE
235
+ AND t.due_time::time < CURRENT_TIME
236
+ )
237
+ )
238
238
  `).andWhere('t.is_done = :is_done', { is_done: false });
239
239
  }
240
240
  qb.orderBy('t.created_date', 'DESC');
@@ -67,21 +67,21 @@ let ScheduleHandlerService = ScheduleHandlerService_1 = class ScheduleHandlerSer
67
67
  const fixedTime = scheduleJson.fixedTime;
68
68
  let comparisonDateCondition = '';
69
69
  if (executionDateName.includes('after')) {
70
- comparisonDateCondition = `
71
- ${executionDataOrTime} >= CURDATE() + INTERVAL ${executionUnits} DAY
72
- AND ${executionDataOrTime} < CURDATE() + INTERVAL ${executionUnits + 1} DAY
70
+ comparisonDateCondition = `
71
+ ${executionDataOrTime} >= CURDATE() + INTERVAL ${executionUnits} DAY
72
+ AND ${executionDataOrTime} < CURDATE() + INTERVAL ${executionUnits + 1} DAY
73
73
  `;
74
74
  }
75
75
  else if (executionDateName.includes('before')) {
76
- comparisonDateCondition = `
77
- ${executionDataOrTime} >= CURDATE() - INTERVAL ${executionUnits + 1} DAY
78
- AND ${executionDataOrTime} < CURDATE() - INTERVAL ${executionUnits} DAY
76
+ comparisonDateCondition = `
77
+ ${executionDataOrTime} >= CURDATE() - INTERVAL ${executionUnits + 1} DAY
78
+ AND ${executionDataOrTime} < CURDATE() - INTERVAL ${executionUnits} DAY
79
79
  `;
80
80
  }
81
81
  else if (executionDateName.includes('same')) {
82
- comparisonDateCondition = `
83
- ${executionDataOrTime} >= CURDATE()
84
- AND ${executionDataOrTime} < CURDATE() + INTERVAL 1 DAY
82
+ comparisonDateCondition = `
83
+ ${executionDataOrTime} >= CURDATE()
84
+ AND ${executionDataOrTime} < CURDATE() + INTERVAL 1 DAY
85
85
  `;
86
86
  }
87
87
  const qb = this.dataSource
@@ -1,7 +1,6 @@
1
1
  import { DashboardPageData } from './module/dashboard/entity/dashboard_page_data.entity';
2
2
  import { EnterpriseData } from './module/enterprise/entity/enterprise.entity';
3
3
  import { OrganizationAppMapping } from './module/enterprise/entity/organization-app-mapping.entity';
4
- import { OrganizationData } from './module/enterprise/entity/organization.entity';
5
4
  import { SavedFilterDetail } from './module/filter/entity/saved-filter-detail.entity';
6
5
  import { IntegrationConfig } from './module/integration/entity/integration-config.entity';
7
6
  import { IntegrationEntityMapper } from './module/integration/entity/integration-entity-mapper.entity';
@@ -37,4 +36,4 @@ import { WorkFlowData } from './module/workflow/entity/workflow-data.entity';
37
36
  import { WorkflowLevelMappingEntity } from './module/workflow/entity/workflow-level-mapping.entity';
38
37
  export declare const frameworkTables: (typeof ListMasterItems | typeof ListMasterData | typeof EntityRelation | typeof SavedFilterDetail | typeof EntityTable | typeof EntityTableColumn | typeof MediaData | typeof PreferenceMaster | typeof IntegrationConfig | typeof UserIntegration | typeof IntegrationEntityMapper | typeof FieldMapper | typeof FieldLovMapper | typeof IntegrationSource | typeof Mapper | typeof NotificationData | typeof LayoutPreference | typeof DashboardPageData | typeof LinkedAttributes)[];
39
38
  export declare const workflowTables: (typeof TemplateAttach | typeof WorkflowLevelMappingEntity | typeof WorkFlowData)[];
40
- export declare const SSOTables: (typeof UserData | typeof Role | typeof ModuleAccess | typeof UserRoleMapping | typeof OrganizationData | typeof AppMaster | typeof UserSession | typeof OrganizationAppMapping | typeof EnterpriseData | typeof ModuleData | typeof ModuleAction | typeof MenuData | typeof Otp | typeof HeaderSection | typeof HeaderItems)[];
39
+ export declare const SSOTables: (typeof UserData | typeof Role | typeof ModuleAccess | typeof UserRoleMapping | typeof AppMaster | typeof UserSession | typeof OrganizationAppMapping | typeof EnterpriseData | typeof ModuleData | typeof ModuleAction | typeof MenuData | typeof Otp | typeof HeaderSection | typeof HeaderItems)[];