rez_core 3.1.167 → 3.1.168

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 (962) hide show
  1. package/dist/app.controller.d.ts +6 -0
  2. package/dist/app.controller.js +34 -0
  3. package/dist/app.controller.js.map +1 -0
  4. package/dist/app.module.d.ts +2 -0
  5. package/dist/app.module.js +62 -0
  6. package/dist/app.module.js.map +1 -0
  7. package/dist/app.service.d.ts +3 -0
  8. package/dist/app.service.js +20 -0
  9. package/dist/app.service.js.map +1 -0
  10. package/dist/config/config.module.d.ts +2 -0
  11. package/dist/config/config.module.js +29 -0
  12. package/dist/config/config.module.js.map +1 -0
  13. package/dist/config/database.config.d.ts +7 -0
  14. package/dist/config/database.config.js +39 -0
  15. package/dist/config/database.config.js.map +1 -0
  16. package/dist/constant/global.constant.d.ts +50 -0
  17. package/dist/constant/global.constant.js +54 -0
  18. package/dist/constant/global.constant.js.map +1 -0
  19. package/dist/core.module.d.ts +4 -0
  20. package/dist/core.module.js +79 -0
  21. package/dist/core.module.js.map +1 -0
  22. package/dist/decorators/roles.decorator.d.ts +1 -0
  23. package/dist/decorators/roles.decorator.js +7 -0
  24. package/dist/decorators/roles.decorator.js.map +1 -0
  25. package/dist/dtos/response.d.ts +5 -0
  26. package/dist/dtos/response.dto.d.ts +5 -0
  27. package/dist/dtos/response.dto.js +3 -0
  28. package/dist/dtos/response.dto.js.map +1 -0
  29. package/dist/dtos/response.js +3 -0
  30. package/dist/dtos/response.js.map +1 -0
  31. package/dist/index.d.ts +1 -0
  32. package/dist/index.js +18 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/main.d.ts +1 -0
  35. package/dist/main.js +25 -0
  36. package/dist/main.js.map +1 -0
  37. package/dist/module/auth/auth.module.d.ts +2 -0
  38. package/dist/module/auth/auth.module.js +57 -0
  39. package/dist/module/auth/auth.module.js.map +1 -0
  40. package/dist/module/auth/controller/auth.controller.d.ts +8 -0
  41. package/dist/module/auth/controller/auth.controller.js +51 -0
  42. package/dist/module/auth/controller/auth.controller.js.map +1 -0
  43. package/dist/module/auth/guards/google-auth.guard.d.ts +6 -0
  44. package/dist/module/auth/guards/google-auth.guard.js +21 -0
  45. package/dist/module/auth/guards/google-auth.guard.js.map +1 -0
  46. package/dist/module/auth/guards/jwt.guard.d.ts +10 -0
  47. package/dist/module/auth/guards/jwt.guard.js +36 -0
  48. package/dist/module/auth/guards/jwt.guard.js.map +1 -0
  49. package/dist/module/auth/guards/role.guard.d.ts +9 -0
  50. package/dist/module/auth/guards/role.guard.js +59 -0
  51. package/dist/module/auth/guards/role.guard.js.map +1 -0
  52. package/dist/module/auth/services/auth.service.d.ts +14 -0
  53. package/dist/module/auth/services/auth.service.js +39 -0
  54. package/dist/module/auth/services/auth.service.js.map +1 -0
  55. package/dist/module/auth/services/jwt.service.d.ts +6 -0
  56. package/dist/module/auth/services/jwt.service.js +28 -0
  57. package/dist/module/auth/services/jwt.service.js.map +1 -0
  58. package/dist/module/auth/strategies/google.strategy.d.ts +10 -0
  59. package/dist/module/auth/strategies/google.strategy.js +59 -0
  60. package/dist/module/auth/strategies/google.strategy.js.map +1 -0
  61. package/dist/module/auth/strategies/jwt.strategy.d.ts +19 -0
  62. package/dist/module/auth/strategies/jwt.strategy.js +46 -0
  63. package/dist/module/auth/strategies/jwt.strategy.js.map +1 -0
  64. package/dist/module/auth/strategies/local.strategy.d.ts +7 -0
  65. package/dist/module/auth/strategies/local.strategy.js +30 -0
  66. package/dist/module/auth/strategies/local.strategy.js.map +1 -0
  67. package/dist/module/dashboard/controller/dashboard.controller.d.ts +33 -0
  68. package/dist/module/dashboard/controller/dashboard.controller.js +55 -0
  69. package/dist/module/dashboard/controller/dashboard.controller.js.map +1 -0
  70. package/dist/module/dashboard/dashboard.module.d.ts +2 -0
  71. package/dist/module/dashboard/dashboard.module.js +34 -0
  72. package/dist/module/dashboard/dashboard.module.js.map +1 -0
  73. package/dist/module/dashboard/entity/dashboard_page_data.entity.d.ts +10 -0
  74. package/dist/module/dashboard/entity/dashboard_page_data.entity.js +50 -0
  75. package/dist/module/dashboard/entity/dashboard_page_data.entity.js.map +1 -0
  76. package/dist/module/dashboard/entity/widget_master.entity.d.ts +7 -0
  77. package/dist/module/dashboard/entity/widget_master.entity.js +38 -0
  78. package/dist/module/dashboard/entity/widget_master.entity.js.map +1 -0
  79. package/dist/module/dashboard/repository/dashboard.repository.d.ts +10 -0
  80. package/dist/module/dashboard/repository/dashboard.repository.js +50 -0
  81. package/dist/module/dashboard/repository/dashboard.repository.js.map +1 -0
  82. package/dist/module/dashboard/service/dashboard.service.d.ts +35 -0
  83. package/dist/module/dashboard/service/dashboard.service.js +62 -0
  84. package/dist/module/dashboard/service/dashboard.service.js.map +1 -0
  85. package/dist/module/dev/dev.module.d.ts +2 -0
  86. package/dist/module/dev/dev.module.js +25 -0
  87. package/dist/module/dev/dev.module.js.map +1 -0
  88. package/dist/module/dev/service/dev.service.d.ts +5 -0
  89. package/dist/module/dev/service/dev.service.js +25 -0
  90. package/dist/module/dev/service/dev.service.js.map +1 -0
  91. package/dist/module/enterprise/controller/organization.controller.d.ts +14 -0
  92. package/dist/module/enterprise/controller/organization.controller.js +59 -0
  93. package/dist/module/enterprise/controller/organization.controller.js.map +1 -0
  94. package/dist/module/enterprise/enterprise.module.d.ts +2 -0
  95. package/dist/module/enterprise/enterprise.module.js +43 -0
  96. package/dist/module/enterprise/enterprise.module.js.map +1 -0
  97. package/dist/module/enterprise/entity/enterprise.entity.d.ts +13 -0
  98. package/dist/module/enterprise/entity/enterprise.entity.js +64 -0
  99. package/dist/module/enterprise/entity/enterprise.entity.js.map +1 -0
  100. package/dist/module/enterprise/entity/organization-app-mapping.entity.d.ts +5 -0
  101. package/dist/module/enterprise/entity/organization-app-mapping.entity.js +32 -0
  102. package/dist/module/enterprise/entity/organization-app-mapping.entity.js.map +1 -0
  103. package/dist/module/enterprise/entity/organization.entity.d.ts +30 -0
  104. package/dist/module/enterprise/entity/organization.entity.js +136 -0
  105. package/dist/module/enterprise/entity/organization.entity.js.map +1 -0
  106. package/dist/module/enterprise/repository/enterprise.repository.d.ts +8 -0
  107. package/dist/module/enterprise/repository/enterprise.repository.js +48 -0
  108. package/dist/module/enterprise/repository/enterprise.repository.js.map +1 -0
  109. package/dist/module/enterprise/repository/organization.repository.d.ts +8 -0
  110. package/dist/module/enterprise/repository/organization.repository.js +41 -0
  111. package/dist/module/enterprise/repository/organization.repository.js.map +1 -0
  112. package/dist/module/enterprise/repository/school.repository.d.ts +8 -0
  113. package/dist/module/enterprise/repository/school.repository.js +244 -0
  114. package/dist/module/enterprise/repository/school.repository.js.map +1 -0
  115. package/dist/module/enterprise/service/brand.service.d.ts +3 -0
  116. package/dist/module/enterprise/service/brand.service.js +18 -0
  117. package/dist/module/enterprise/service/brand.service.js.map +1 -0
  118. package/dist/module/enterprise/service/enterprise.service.d.ts +8 -0
  119. package/dist/module/enterprise/service/enterprise.service.js +31 -0
  120. package/dist/module/enterprise/service/enterprise.service.js.map +1 -0
  121. package/dist/module/enterprise/service/organization-app-mapping.service.d.ts +2 -0
  122. package/dist/module/enterprise/service/organization-app-mapping.service.js +17 -0
  123. package/dist/module/enterprise/service/organization-app-mapping.service.js.map +1 -0
  124. package/dist/module/enterprise/service/organization.service.d.ts +19 -0
  125. package/dist/module/enterprise/service/organization.service.js +121 -0
  126. package/dist/module/enterprise/service/organization.service.js.map +1 -0
  127. package/dist/module/filter/controller/filter.controller.d.ts +39 -0
  128. package/dist/module/filter/controller/filter.controller.js +91 -0
  129. package/dist/module/filter/controller/filter.controller.js.map +1 -0
  130. package/dist/module/filter/dto/filter-request.dto.d.ts +35 -0
  131. package/dist/module/filter/dto/filter-request.dto.js +3 -0
  132. package/dist/module/filter/dto/filter-request.dto.js.map +1 -0
  133. package/dist/module/filter/entity/saved-filter-detail.entity.d.ts +14 -0
  134. package/dist/module/filter/entity/saved-filter-detail.entity.js +67 -0
  135. package/dist/module/filter/entity/saved-filter-detail.entity.js.map +1 -0
  136. package/dist/module/filter/entity/saved-filter-master.entity.d.ts +8 -0
  137. package/dist/module/filter/entity/saved-filter-master.entity.js +43 -0
  138. package/dist/module/filter/entity/saved-filter-master.entity.js.map +1 -0
  139. package/dist/module/filter/filter.module.d.ts +2 -0
  140. package/dist/module/filter/filter.module.js +44 -0
  141. package/dist/module/filter/filter.module.js.map +1 -0
  142. package/dist/module/filter/repository/saved-filter.repository.d.ts +40 -0
  143. package/dist/module/filter/repository/saved-filter.repository.js +144 -0
  144. package/dist/module/filter/repository/saved-filter.repository.js.map +1 -0
  145. package/dist/module/filter/service/filter-evaluator.service.d.ts +9 -0
  146. package/dist/module/filter/service/filter-evaluator.service.js +62 -0
  147. package/dist/module/filter/service/filter-evaluator.service.js.map +1 -0
  148. package/dist/module/filter/service/filter.service.d.ts +68 -0
  149. package/dist/module/filter/service/filter.service.js +612 -0
  150. package/dist/module/filter/service/filter.service.js.map +1 -0
  151. package/dist/module/filter/service/saved-filter.service.d.ts +30 -0
  152. package/dist/module/filter/service/saved-filter.service.js +125 -0
  153. package/dist/module/filter/service/saved-filter.service.js.map +1 -0
  154. package/dist/module/ics/controller/ics.controller.d.ts +8 -0
  155. package/dist/module/ics/controller/ics.controller.js +45 -0
  156. package/dist/module/ics/controller/ics.controller.js.map +1 -0
  157. package/dist/module/ics/dto/ics.dto.d.ts +17 -0
  158. package/dist/module/ics/dto/ics.dto.js +73 -0
  159. package/dist/module/ics/dto/ics.dto.js.map +1 -0
  160. package/dist/module/ics/ics.module.d.ts +2 -0
  161. package/dist/module/ics/ics.module.js +26 -0
  162. package/dist/module/ics/ics.module.js.map +1 -0
  163. package/dist/module/ics/service/ics.service.d.ts +4 -0
  164. package/dist/module/ics/service/ics.service.js +61 -0
  165. package/dist/module/ics/service/ics.service.js.map +1 -0
  166. package/dist/module/integration/controller/calender-event.controller.d.ts +7 -0
  167. package/dist/module/integration/controller/calender-event.controller.js +51 -0
  168. package/dist/module/integration/controller/calender-event.controller.js.map +1 -0
  169. package/dist/module/integration/controller/integration.controller.d.ts +165 -0
  170. package/dist/module/integration/controller/integration.controller.js +697 -0
  171. package/dist/module/integration/controller/integration.controller.js.map +1 -0
  172. package/dist/module/integration/controller/wrapper.controller.d.ts +23 -0
  173. package/dist/module/integration/controller/wrapper.controller.js +54 -0
  174. package/dist/module/integration/controller/wrapper.controller.js.map +1 -0
  175. package/dist/module/integration/dto/create-config.dto.d.ts +217 -0
  176. package/dist/module/integration/dto/create-config.dto.js +495 -0
  177. package/dist/module/integration/dto/create-config.dto.js.map +1 -0
  178. package/dist/module/integration/entity/integration-config.entity.d.ts +54 -0
  179. package/dist/module/integration/entity/integration-config.entity.js +78 -0
  180. package/dist/module/integration/entity/integration-config.entity.js.map +1 -0
  181. package/dist/module/integration/entity/integration-entity-mapper.entity.d.ts +6 -0
  182. package/dist/module/integration/entity/integration-entity-mapper.entity.js +33 -0
  183. package/dist/module/integration/entity/integration-entity-mapper.entity.js.map +1 -0
  184. package/dist/module/integration/entity/integration-source.entity.d.ts +7 -0
  185. package/dist/module/integration/entity/integration-source.entity.js +37 -0
  186. package/dist/module/integration/entity/integration-source.entity.js.map +1 -0
  187. package/dist/module/integration/entity/user-integration.entity.d.ts +23 -0
  188. package/dist/module/integration/entity/user-integration.entity.js +70 -0
  189. package/dist/module/integration/entity/user-integration.entity.js.map +1 -0
  190. package/dist/module/integration/examples/usage.example.d.ts +16 -0
  191. package/dist/module/integration/examples/usage.example.js +217 -0
  192. package/dist/module/integration/examples/usage.example.js.map +1 -0
  193. package/dist/module/integration/factories/base.factory.d.ts +9 -0
  194. package/dist/module/integration/factories/base.factory.js +3 -0
  195. package/dist/module/integration/factories/base.factory.js.map +1 -0
  196. package/dist/module/integration/factories/email.factory.d.ts +17 -0
  197. package/dist/module/integration/factories/email.factory.js +55 -0
  198. package/dist/module/integration/factories/email.factory.js.map +1 -0
  199. package/dist/module/integration/factories/integration.factory.d.ts +33 -0
  200. package/dist/module/integration/factories/integration.factory.js +104 -0
  201. package/dist/module/integration/factories/integration.factory.js.map +1 -0
  202. package/dist/module/integration/factories/sms.factory.d.ts +17 -0
  203. package/dist/module/integration/factories/sms.factory.js +58 -0
  204. package/dist/module/integration/factories/sms.factory.js.map +1 -0
  205. package/dist/module/integration/factories/telephone.factory.d.ts +15 -0
  206. package/dist/module/integration/factories/telephone.factory.js +49 -0
  207. package/dist/module/integration/factories/telephone.factory.js.map +1 -0
  208. package/dist/module/integration/factories/whatsapp.factory.d.ts +19 -0
  209. package/dist/module/integration/factories/whatsapp.factory.js +63 -0
  210. package/dist/module/integration/factories/whatsapp.factory.js.map +1 -0
  211. package/dist/module/integration/integration.module.d.ts +2 -0
  212. package/dist/module/integration/integration.module.js +96 -0
  213. package/dist/module/integration/integration.module.js.map +1 -0
  214. package/dist/module/integration/service/calendar-event.service.d.ts +8 -0
  215. package/dist/module/integration/service/calendar-event.service.js +101 -0
  216. package/dist/module/integration/service/calendar-event.service.js.map +1 -0
  217. package/dist/module/integration/service/integration-entity-mapper.service.d.ts +7 -0
  218. package/dist/module/integration/service/integration-entity-mapper.service.js +36 -0
  219. package/dist/module/integration/service/integration-entity-mapper.service.js.map +1 -0
  220. package/dist/module/integration/service/integration-queue.service.d.ts +40 -0
  221. package/dist/module/integration/service/integration-queue.service.js +147 -0
  222. package/dist/module/integration/service/integration-queue.service.js.map +1 -0
  223. package/dist/module/integration/service/integration.service.d.ts +198 -0
  224. package/dist/module/integration/service/integration.service.js +1558 -0
  225. package/dist/module/integration/service/integration.service.js.map +1 -0
  226. package/dist/module/integration/service/oauth.service.d.ts +18 -0
  227. package/dist/module/integration/service/oauth.service.js +190 -0
  228. package/dist/module/integration/service/oauth.service.js.map +1 -0
  229. package/dist/module/integration/service/wrapper.service.d.ts +36 -0
  230. package/dist/module/integration/service/wrapper.service.js +299 -0
  231. package/dist/module/integration/service/wrapper.service.js.map +1 -0
  232. package/dist/module/integration/strategies/email/gmail-api.strategy.d.ts +13 -0
  233. package/dist/module/integration/strategies/email/gmail-api.strategy.js +195 -0
  234. package/dist/module/integration/strategies/email/gmail-api.strategy.js.map +1 -0
  235. package/dist/module/integration/strategies/email/outlook-api.strategy.d.ts +5 -0
  236. package/dist/module/integration/strategies/email/outlook-api.strategy.js +44 -0
  237. package/dist/module/integration/strategies/email/outlook-api.strategy.js.map +1 -0
  238. package/dist/module/integration/strategies/email/outlook.strategy.d.ts +5 -0
  239. package/dist/module/integration/strategies/email/outlook.strategy.js +64 -0
  240. package/dist/module/integration/strategies/email/outlook.strategy.js.map +1 -0
  241. package/dist/module/integration/strategies/email/sendgrid-api.strategy.d.ts +22 -0
  242. package/dist/module/integration/strategies/email/sendgrid-api.strategy.js +203 -0
  243. package/dist/module/integration/strategies/email/sendgrid-api.strategy.js.map +1 -0
  244. package/dist/module/integration/strategies/integration.strategy.d.ts +31 -0
  245. package/dist/module/integration/strategies/integration.strategy.js +40 -0
  246. package/dist/module/integration/strategies/integration.strategy.js.map +1 -0
  247. package/dist/module/integration/strategies/sms/gupshup-sms.strategy.d.ts +9 -0
  248. package/dist/module/integration/strategies/sms/gupshup-sms.strategy.js +104 -0
  249. package/dist/module/integration/strategies/sms/gupshup-sms.strategy.js.map +1 -0
  250. package/dist/module/integration/strategies/sms/msg91-sms.strategy.d.ts +9 -0
  251. package/dist/module/integration/strategies/sms/msg91-sms.strategy.js +113 -0
  252. package/dist/module/integration/strategies/sms/msg91-sms.strategy.js.map +1 -0
  253. package/dist/module/integration/strategies/sms/tubelight-sms.strategy.d.ts +9 -0
  254. package/dist/module/integration/strategies/sms/tubelight-sms.strategy.js +109 -0
  255. package/dist/module/integration/strategies/sms/tubelight-sms.strategy.js.map +1 -0
  256. package/dist/module/integration/strategies/telephone/ozonetel-voice.strategy.d.ts +22 -0
  257. package/dist/module/integration/strategies/telephone/ozonetel-voice.strategy.js +170 -0
  258. package/dist/module/integration/strategies/telephone/ozonetel-voice.strategy.js.map +1 -0
  259. package/dist/module/integration/strategies/telephone/tubelight-voice.strategy.d.ts +24 -0
  260. package/dist/module/integration/strategies/telephone/tubelight-voice.strategy.js +152 -0
  261. package/dist/module/integration/strategies/telephone/tubelight-voice.strategy.js.map +1 -0
  262. package/dist/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.d.ts +19 -0
  263. package/dist/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.js +257 -0
  264. package/dist/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.js.map +1 -0
  265. package/dist/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.d.ts +33 -0
  266. package/dist/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.js +256 -0
  267. package/dist/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.js.map +1 -0
  268. package/dist/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.d.ts +20 -0
  269. package/dist/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.js +264 -0
  270. package/dist/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.js.map +1 -0
  271. package/dist/module/integration/strategies/whatsapp/whatsapp.strategy.d.ts +5 -0
  272. package/dist/module/integration/strategies/whatsapp/whatsapp.strategy.js +57 -0
  273. package/dist/module/integration/strategies/whatsapp/whatsapp.strategy.js.map +1 -0
  274. package/dist/module/layout/controller/layout.controller.d.ts +11 -0
  275. package/dist/module/layout/controller/layout.controller.js +59 -0
  276. package/dist/module/layout/controller/layout.controller.js.map +1 -0
  277. package/dist/module/layout/dto/header.dto.d.ts +0 -0
  278. package/dist/module/layout/dto/header.dto.js +1 -0
  279. package/dist/module/layout/dto/header.dto.js.map +1 -0
  280. package/dist/module/layout/entity/header-items.entity.d.ts +10 -0
  281. package/dist/module/layout/entity/header-items.entity.js +52 -0
  282. package/dist/module/layout/entity/header-items.entity.js.map +1 -0
  283. package/dist/module/layout/entity/header-section.entity.d.ts +7 -0
  284. package/dist/module/layout/entity/header-section.entity.js +40 -0
  285. package/dist/module/layout/entity/header-section.entity.js.map +1 -0
  286. package/dist/module/layout/layout.module.d.ts +2 -0
  287. package/dist/module/layout/layout.module.js +34 -0
  288. package/dist/module/layout/layout.module.js.map +1 -0
  289. package/dist/module/layout/repository/header-items.repository.d.ts +7 -0
  290. package/dist/module/layout/repository/header-items.repository.js +36 -0
  291. package/dist/module/layout/repository/header-items.repository.js.map +1 -0
  292. package/dist/module/layout/repository/header-section.repository.d.ts +8 -0
  293. package/dist/module/layout/repository/header-section.repository.js +39 -0
  294. package/dist/module/layout/repository/header-section.repository.js.map +1 -0
  295. package/dist/module/layout/service/header-section.service.d.ts +8 -0
  296. package/dist/module/layout/service/header-section.service.js +37 -0
  297. package/dist/module/layout/service/header-section.service.js.map +1 -0
  298. package/dist/module/layout_preference/controller/layout_preference.controller.d.ts +13 -0
  299. package/dist/module/layout_preference/controller/layout_preference.controller.js +59 -0
  300. package/dist/module/layout_preference/controller/layout_preference.controller.js.map +1 -0
  301. package/dist/module/layout_preference/dto/layout_preference.dto.d.ts +0 -0
  302. package/dist/module/layout_preference/dto/layout_preference.dto.js +1 -0
  303. package/dist/module/layout_preference/dto/layout_preference.dto.js.map +1 -0
  304. package/dist/module/layout_preference/entity/layout_preference.entity.d.ts +9 -0
  305. package/dist/module/layout_preference/entity/layout_preference.entity.js +50 -0
  306. package/dist/module/layout_preference/entity/layout_preference.entity.js.map +1 -0
  307. package/dist/module/layout_preference/layout_preference.module.d.ts +2 -0
  308. package/dist/module/layout_preference/layout_preference.module.js +31 -0
  309. package/dist/module/layout_preference/layout_preference.module.js.map +1 -0
  310. package/dist/module/layout_preference/repository/layout_preference.repository.d.ts +7 -0
  311. package/dist/module/layout_preference/repository/layout_preference.repository.js +42 -0
  312. package/dist/module/layout_preference/repository/layout_preference.repository.js.map +1 -0
  313. package/dist/module/layout_preference/service/layout_preference.service.d.ts +16 -0
  314. package/dist/module/layout_preference/service/layout_preference.service.js +117 -0
  315. package/dist/module/layout_preference/service/layout_preference.service.js.map +1 -0
  316. package/dist/module/lead/controller/lead.controller.d.ts +20 -0
  317. package/dist/module/lead/controller/lead.controller.js +58 -0
  318. package/dist/module/lead/controller/lead.controller.js.map +1 -0
  319. package/dist/module/lead/lead.module.d.ts +2 -0
  320. package/dist/module/lead/lead.module.js +26 -0
  321. package/dist/module/lead/lead.module.js.map +1 -0
  322. package/dist/module/lead/repository/lead.repository.d.ts +10 -0
  323. package/dist/module/lead/repository/lead.repository.js +53 -0
  324. package/dist/module/lead/repository/lead.repository.js.map +1 -0
  325. package/dist/module/lead/service/lead.service.d.ts +20 -0
  326. package/dist/module/lead/service/lead.service.js +55 -0
  327. package/dist/module/lead/service/lead.service.js.map +1 -0
  328. package/dist/module/listmaster/controller/list-master.controller.d.ts +22 -0
  329. package/dist/module/listmaster/controller/list-master.controller.js +156 -0
  330. package/dist/module/listmaster/controller/list-master.controller.js.map +1 -0
  331. package/dist/module/listmaster/entity/list-master-items.entity.d.ts +14 -0
  332. package/dist/module/listmaster/entity/list-master-items.entity.js +67 -0
  333. package/dist/module/listmaster/entity/list-master-items.entity.js.map +1 -0
  334. package/dist/module/listmaster/entity/list-master.entity.d.ts +11 -0
  335. package/dist/module/listmaster/entity/list-master.entity.js +55 -0
  336. package/dist/module/listmaster/entity/list-master.entity.js.map +1 -0
  337. package/dist/module/listmaster/listmaster.module.d.ts +2 -0
  338. package/dist/module/listmaster/listmaster.module.js +53 -0
  339. package/dist/module/listmaster/listmaster.module.js.map +1 -0
  340. package/dist/module/listmaster/repository/list-master-items.repository.d.ts +21 -0
  341. package/dist/module/listmaster/repository/list-master-items.repository.js +142 -0
  342. package/dist/module/listmaster/repository/list-master-items.repository.js.map +1 -0
  343. package/dist/module/listmaster/repository/list-master.repository.d.ts +9 -0
  344. package/dist/module/listmaster/repository/list-master.repository.js +53 -0
  345. package/dist/module/listmaster/repository/list-master.repository.js.map +1 -0
  346. package/dist/module/listmaster/service/list-master-engine.d.ts +6 -0
  347. package/dist/module/listmaster/service/list-master-engine.js +35 -0
  348. package/dist/module/listmaster/service/list-master-engine.js.map +1 -0
  349. package/dist/module/listmaster/service/list-master-extension.interface.d.ts +4 -0
  350. package/dist/module/listmaster/service/list-master-extension.interface.js +3 -0
  351. package/dist/module/listmaster/service/list-master-extension.interface.js.map +1 -0
  352. package/dist/module/listmaster/service/list-master-item.service.d.ts +19 -0
  353. package/dist/module/listmaster/service/list-master-item.service.js +151 -0
  354. package/dist/module/listmaster/service/list-master-item.service.js.map +1 -0
  355. package/dist/module/listmaster/service/list-master-registry.d.ts +6 -0
  356. package/dist/module/listmaster/service/list-master-registry.js +26 -0
  357. package/dist/module/listmaster/service/list-master-registry.js.map +1 -0
  358. package/dist/module/listmaster/service/list-master.service.d.ts +36 -0
  359. package/dist/module/listmaster/service/list-master.service.js +270 -0
  360. package/dist/module/listmaster/service/list-master.service.js.map +1 -0
  361. package/dist/module/mapper/controller/field-mapper.controller.d.ts +11 -0
  362. package/dist/module/mapper/controller/field-mapper.controller.js +94 -0
  363. package/dist/module/mapper/controller/field-mapper.controller.js.map +1 -0
  364. package/dist/module/mapper/controller/mapper.controller.d.ts +6 -0
  365. package/dist/module/mapper/controller/mapper.controller.js +40 -0
  366. package/dist/module/mapper/controller/mapper.controller.js.map +1 -0
  367. package/dist/module/mapper/dto/field-mapper.dto.d.ts +12 -0
  368. package/dist/module/mapper/dto/field-mapper.dto.js +8 -0
  369. package/dist/module/mapper/dto/field-mapper.dto.js.map +1 -0
  370. package/dist/module/mapper/entity/field-lovs.entity.d.ts +7 -0
  371. package/dist/module/mapper/entity/field-lovs.entity.js +38 -0
  372. package/dist/module/mapper/entity/field-lovs.entity.js.map +1 -0
  373. package/dist/module/mapper/entity/field-mapper.entity.d.ts +13 -0
  374. package/dist/module/mapper/entity/field-mapper.entity.js +78 -0
  375. package/dist/module/mapper/entity/field-mapper.entity.js.map +1 -0
  376. package/dist/module/mapper/entity/mapper.entity.d.ts +6 -0
  377. package/dist/module/mapper/entity/mapper.entity.js +34 -0
  378. package/dist/module/mapper/entity/mapper.entity.js.map +1 -0
  379. package/dist/module/mapper/mapper.module.d.ts +2 -0
  380. package/dist/module/mapper/mapper.module.js +47 -0
  381. package/dist/module/mapper/mapper.module.js.map +1 -0
  382. package/dist/module/mapper/repository/field-lovs.repository.d.ts +11 -0
  383. package/dist/module/mapper/repository/field-lovs.repository.js +52 -0
  384. package/dist/module/mapper/repository/field-lovs.repository.js.map +1 -0
  385. package/dist/module/mapper/repository/field-mapper.repository.d.ts +11 -0
  386. package/dist/module/mapper/repository/field-mapper.repository.js +54 -0
  387. package/dist/module/mapper/repository/field-mapper.repository.js.map +1 -0
  388. package/dist/module/mapper/repository/mapper.repository.d.ts +7 -0
  389. package/dist/module/mapper/repository/mapper.repository.js +34 -0
  390. package/dist/module/mapper/repository/mapper.repository.js.map +1 -0
  391. package/dist/module/mapper/service/field-mapper.service.d.ts +22 -0
  392. package/dist/module/mapper/service/field-mapper.service.js +177 -0
  393. package/dist/module/mapper/service/field-mapper.service.js.map +1 -0
  394. package/dist/module/mapper/service/mapper.service.d.ts +17 -0
  395. package/dist/module/mapper/service/mapper.service.js +72 -0
  396. package/dist/module/mapper/service/mapper.service.js.map +1 -0
  397. package/dist/module/master/controller/master.controller.d.ts +20 -0
  398. package/dist/module/master/controller/master.controller.js +82 -0
  399. package/dist/module/master/controller/master.controller.js.map +1 -0
  400. package/dist/module/master/service/master.service.d.ts +31 -0
  401. package/dist/module/master/service/master.service.js +364 -0
  402. package/dist/module/master/service/master.service.js.map +1 -0
  403. package/dist/module/meta/controller/app-master.controller.d.ts +9 -0
  404. package/dist/module/meta/controller/app-master.controller.js +51 -0
  405. package/dist/module/meta/controller/app-master.controller.js.map +1 -0
  406. package/dist/module/meta/controller/attribute-master.controller.d.ts +21 -0
  407. package/dist/module/meta/controller/attribute-master.controller.js +78 -0
  408. package/dist/module/meta/controller/attribute-master.controller.js.map +1 -0
  409. package/dist/module/meta/controller/entity-dynamic.controller.d.ts +21 -0
  410. package/dist/module/meta/controller/entity-dynamic.controller.js +115 -0
  411. package/dist/module/meta/controller/entity-dynamic.controller.js.map +1 -0
  412. package/dist/module/meta/controller/entity-master.controller.d.ts +8 -0
  413. package/dist/module/meta/controller/entity-master.controller.js +44 -0
  414. package/dist/module/meta/controller/entity-master.controller.js.map +1 -0
  415. package/dist/module/meta/controller/entity-relation.controller.d.ts +6 -0
  416. package/dist/module/meta/controller/entity-relation.controller.js +45 -0
  417. package/dist/module/meta/controller/entity-relation.controller.js.map +1 -0
  418. package/dist/module/meta/controller/entity.controller.d.ts +38 -0
  419. package/dist/module/meta/controller/entity.controller.js +245 -0
  420. package/dist/module/meta/controller/entity.controller.js.map +1 -0
  421. package/dist/module/meta/controller/media.controller.d.ts +17 -0
  422. package/dist/module/meta/controller/media.controller.js +80 -0
  423. package/dist/module/meta/controller/media.controller.js.map +1 -0
  424. package/dist/module/meta/controller/meta.controller.d.ts +32 -0
  425. package/dist/module/meta/controller/meta.controller.js +112 -0
  426. package/dist/module/meta/controller/meta.controller.js.map +1 -0
  427. package/dist/module/meta/controller/view-master.controller.d.ts +12 -0
  428. package/dist/module/meta/controller/view-master.controller.js +88 -0
  429. package/dist/module/meta/controller/view-master.controller.js.map +1 -0
  430. package/dist/module/meta/dto/entity-list-data.dto.d.ts +5 -0
  431. package/dist/module/meta/dto/entity-list-data.dto.js +7 -0
  432. package/dist/module/meta/dto/entity-list-data.dto.js.map +1 -0
  433. package/dist/module/meta/dto/entity-tab.dto.d.ts +4 -0
  434. package/dist/module/meta/dto/entity-tab.dto.js +7 -0
  435. package/dist/module/meta/dto/entity-tab.dto.js.map +1 -0
  436. package/dist/module/meta/dto/entity-table.dto.d.ts +11 -0
  437. package/dist/module/meta/dto/entity-table.dto.js +8 -0
  438. package/dist/module/meta/dto/entity-table.dto.js.map +1 -0
  439. package/dist/module/meta/entity/app-master.entity.d.ts +12 -0
  440. package/dist/module/meta/entity/app-master.entity.js +58 -0
  441. package/dist/module/meta/entity/app-master.entity.js.map +1 -0
  442. package/dist/module/meta/entity/attribute-master.entity.d.ts +22 -0
  443. package/dist/module/meta/entity/attribute-master.entity.js +122 -0
  444. package/dist/module/meta/entity/attribute-master.entity.js.map +1 -0
  445. package/dist/module/meta/entity/base-entity.entity.d.ts +19 -0
  446. package/dist/module/meta/entity/base-entity.entity.js +104 -0
  447. package/dist/module/meta/entity/base-entity.entity.js.map +1 -0
  448. package/dist/module/meta/entity/entity-master.entity.d.ts +18 -0
  449. package/dist/module/meta/entity/entity-master.entity.js +108 -0
  450. package/dist/module/meta/entity/entity-master.entity.js.map +1 -0
  451. package/dist/module/meta/entity/entity-relation-data.entity.d.ts +10 -0
  452. package/dist/module/meta/entity/entity-relation-data.entity.js +51 -0
  453. package/dist/module/meta/entity/entity-relation-data.entity.js.map +1 -0
  454. package/dist/module/meta/entity/entity-relation.entity.d.ts +8 -0
  455. package/dist/module/meta/entity/entity-relation.entity.js +43 -0
  456. package/dist/module/meta/entity/entity-relation.entity.js.map +1 -0
  457. package/dist/module/meta/entity/entity-table-column.entity.d.ts +19 -0
  458. package/dist/module/meta/entity/entity-table-column.entity.js +92 -0
  459. package/dist/module/meta/entity/entity-table-column.entity.js.map +1 -0
  460. package/dist/module/meta/entity/entity-table.entity.d.ts +17 -0
  461. package/dist/module/meta/entity/entity-table.entity.js +79 -0
  462. package/dist/module/meta/entity/entity-table.entity.js.map +1 -0
  463. package/dist/module/meta/entity/media-data.entity.d.ts +11 -0
  464. package/dist/module/meta/entity/media-data.entity.js +55 -0
  465. package/dist/module/meta/entity/media-data.entity.js.map +1 -0
  466. package/dist/module/meta/entity/preference.entity.d.ts +11 -0
  467. package/dist/module/meta/entity/preference.entity.js +85 -0
  468. package/dist/module/meta/entity/preference.entity.js.map +1 -0
  469. package/dist/module/meta/entity/view-master.entity.d.ts +14 -0
  470. package/dist/module/meta/entity/view-master.entity.js +67 -0
  471. package/dist/module/meta/entity/view-master.entity.js.map +1 -0
  472. package/dist/module/meta/entity.module.d.ts +2 -0
  473. package/dist/module/meta/entity.module.js +153 -0
  474. package/dist/module/meta/entity.module.js.map +1 -0
  475. package/dist/module/meta/repository/app-master.repository.d.ts +7 -0
  476. package/dist/module/meta/repository/app-master.repository.js +36 -0
  477. package/dist/module/meta/repository/app-master.repository.js.map +1 -0
  478. package/dist/module/meta/repository/attribute-master.repository.d.ts +20 -0
  479. package/dist/module/meta/repository/attribute-master.repository.js +85 -0
  480. package/dist/module/meta/repository/attribute-master.repository.js.map +1 -0
  481. package/dist/module/meta/repository/entity-master.repository.d.ts +20 -0
  482. package/dist/module/meta/repository/entity-master.repository.js +73 -0
  483. package/dist/module/meta/repository/entity-master.repository.js.map +1 -0
  484. package/dist/module/meta/repository/entity-table-column.repository.d.ts +7 -0
  485. package/dist/module/meta/repository/entity-table-column.repository.js +52 -0
  486. package/dist/module/meta/repository/entity-table-column.repository.js.map +1 -0
  487. package/dist/module/meta/repository/entity-table.repository.d.ts +9 -0
  488. package/dist/module/meta/repository/entity-table.repository.js +59 -0
  489. package/dist/module/meta/repository/entity-table.repository.js.map +1 -0
  490. package/dist/module/meta/repository/media-data.repository.d.ts +9 -0
  491. package/dist/module/meta/repository/media-data.repository.js +55 -0
  492. package/dist/module/meta/repository/media-data.repository.js.map +1 -0
  493. package/dist/module/meta/repository/preference.repository.d.ts +7 -0
  494. package/dist/module/meta/repository/preference.repository.js +36 -0
  495. package/dist/module/meta/repository/preference.repository.js.map +1 -0
  496. package/dist/module/meta/repository/user-app-mapping.repository.d.ts +0 -0
  497. package/dist/module/meta/repository/user-app-mapping.repository.js +1 -0
  498. package/dist/module/meta/repository/user-app-mapping.repository.js.map +1 -0
  499. package/dist/module/meta/repository/view-master.repository.d.ts +11 -0
  500. package/dist/module/meta/repository/view-master.repository.js +52 -0
  501. package/dist/module/meta/repository/view-master.repository.js.map +1 -0
  502. package/dist/module/meta/service/app-master.service.d.ts +8 -0
  503. package/dist/module/meta/service/app-master.service.js +45 -0
  504. package/dist/module/meta/service/app-master.service.js.map +1 -0
  505. package/dist/module/meta/service/attribute-master.service.d.ts +16 -0
  506. package/dist/module/meta/service/attribute-master.service.js +75 -0
  507. package/dist/module/meta/service/attribute-master.service.js.map +1 -0
  508. package/dist/module/meta/service/common.service.d.ts +4 -0
  509. package/dist/module/meta/service/common.service.js +25 -0
  510. package/dist/module/meta/service/common.service.js.map +1 -0
  511. package/dist/module/meta/service/entity-dynamic.service.d.ts +23 -0
  512. package/dist/module/meta/service/entity-dynamic.service.js +452 -0
  513. package/dist/module/meta/service/entity-dynamic.service.js.map +1 -0
  514. package/dist/module/meta/service/entity-list.service.d.ts +17 -0
  515. package/dist/module/meta/service/entity-list.service.js +141 -0
  516. package/dist/module/meta/service/entity-list.service.js.map +1 -0
  517. package/dist/module/meta/service/entity-master.service.d.ts +29 -0
  518. package/dist/module/meta/service/entity-master.service.js +112 -0
  519. package/dist/module/meta/service/entity-master.service.js.map +1 -0
  520. package/dist/module/meta/service/entity-realation-data.service.d.ts +4 -0
  521. package/dist/module/meta/service/entity-realation-data.service.js +25 -0
  522. package/dist/module/meta/service/entity-realation-data.service.js.map +1 -0
  523. package/dist/module/meta/service/entity-relation.service.d.ts +8 -0
  524. package/dist/module/meta/service/entity-relation.service.js +58 -0
  525. package/dist/module/meta/service/entity-relation.service.js.map +1 -0
  526. package/dist/module/meta/service/entity-service-impl.service.d.ts +43 -0
  527. package/dist/module/meta/service/entity-service-impl.service.js +278 -0
  528. package/dist/module/meta/service/entity-service-impl.service.js.map +1 -0
  529. package/dist/module/meta/service/entity-table-column.service.d.ts +7 -0
  530. package/dist/module/meta/service/entity-table-column.service.js +37 -0
  531. package/dist/module/meta/service/entity-table-column.service.js.map +1 -0
  532. package/dist/module/meta/service/entity-table.service.d.ts +17 -0
  533. package/dist/module/meta/service/entity-table.service.js +84 -0
  534. package/dist/module/meta/service/entity-table.service.js.map +1 -0
  535. package/dist/module/meta/service/entity-validation.service.d.ts +21 -0
  536. package/dist/module/meta/service/entity-validation.service.js +117 -0
  537. package/dist/module/meta/service/entity-validation.service.js.map +1 -0
  538. package/dist/module/meta/service/entity.service.d.ts +15 -0
  539. package/dist/module/meta/service/entity.service.js +3 -0
  540. package/dist/module/meta/service/entity.service.js.map +1 -0
  541. package/dist/module/meta/service/field-group.service.d.ts +26 -0
  542. package/dist/module/meta/service/field-group.service.js +76 -0
  543. package/dist/module/meta/service/field-group.service.js.map +1 -0
  544. package/dist/module/meta/service/media-data.service.d.ts +30 -0
  545. package/dist/module/meta/service/media-data.service.js +116 -0
  546. package/dist/module/meta/service/media-data.service.js.map +1 -0
  547. package/dist/module/meta/service/populate-meta.service.d.ts +11 -0
  548. package/dist/module/meta/service/populate-meta.service.js +124 -0
  549. package/dist/module/meta/service/populate-meta.service.js.map +1 -0
  550. package/dist/module/meta/service/preference.service.d.ts +7 -0
  551. package/dist/module/meta/service/preference.service.js +31 -0
  552. package/dist/module/meta/service/preference.service.js.map +1 -0
  553. package/dist/module/meta/service/resolver.service.d.ts +11 -0
  554. package/dist/module/meta/service/resolver.service.js +156 -0
  555. package/dist/module/meta/service/resolver.service.js.map +1 -0
  556. package/dist/module/meta/service/section-master.service.d.ts +26 -0
  557. package/dist/module/meta/service/section-master.service.js +77 -0
  558. package/dist/module/meta/service/section-master.service.js.map +1 -0
  559. package/dist/module/meta/service/update-form-json.service.d.ts +9 -0
  560. package/dist/module/meta/service/update-form-json.service.js +39 -0
  561. package/dist/module/meta/service/update-form-json.service.js.map +1 -0
  562. package/dist/module/meta/service/user-app-mapping.service.d.ts +0 -0
  563. package/dist/module/meta/service/user-app-mapping.service.js +1 -0
  564. package/dist/module/meta/service/user-app-mapping.service.js.map +1 -0
  565. package/dist/module/meta/service/view-master.service.d.ts +27 -0
  566. package/dist/module/meta/service/view-master.service.js +69 -0
  567. package/dist/module/meta/service/view-master.service.js.map +1 -0
  568. package/dist/module/module/controller/menu.controller.d.ts +8 -0
  569. package/dist/module/module/controller/menu.controller.js +41 -0
  570. package/dist/module/module/controller/menu.controller.js.map +1 -0
  571. package/dist/module/module/controller/module-access.controller.d.ts +35 -0
  572. package/dist/module/module/controller/module-access.controller.js +148 -0
  573. package/dist/module/module/controller/module-access.controller.js.map +1 -0
  574. package/dist/module/module/entity/menu.entity.d.ts +15 -0
  575. package/dist/module/module/entity/menu.entity.js +72 -0
  576. package/dist/module/module/entity/menu.entity.js.map +1 -0
  577. package/dist/module/module/entity/module-access.entity.d.ts +9 -0
  578. package/dist/module/module/entity/module-access.entity.js +48 -0
  579. package/dist/module/module/entity/module-access.entity.js.map +1 -0
  580. package/dist/module/module/entity/module-action.entity.d.ts +6 -0
  581. package/dist/module/module/entity/module-action.entity.js +37 -0
  582. package/dist/module/module/entity/module-action.entity.js.map +1 -0
  583. package/dist/module/module/entity/module.entity.d.ts +18 -0
  584. package/dist/module/module/entity/module.entity.js +84 -0
  585. package/dist/module/module/entity/module.entity.js.map +1 -0
  586. package/dist/module/module/module.module.d.ts +2 -0
  587. package/dist/module/module/module.module.js +55 -0
  588. package/dist/module/module/module.module.js.map +1 -0
  589. package/dist/module/module/repository/menu.repository.d.ts +11 -0
  590. package/dist/module/module/repository/menu.repository.js +152 -0
  591. package/dist/module/module/repository/menu.repository.js.map +1 -0
  592. package/dist/module/module/repository/module-access.repository.d.ts +51 -0
  593. package/dist/module/module/repository/module-access.repository.js +275 -0
  594. package/dist/module/module/repository/module-access.repository.js.map +1 -0
  595. package/dist/module/module/service/menu.service.d.ts +12 -0
  596. package/dist/module/module/service/menu.service.js +59 -0
  597. package/dist/module/module/service/menu.service.js.map +1 -0
  598. package/dist/module/module/service/module-access.service.d.ts +60 -0
  599. package/dist/module/module/service/module-access.service.js +119 -0
  600. package/dist/module/module/service/module-access.service.js.map +1 -0
  601. package/dist/module/notification/controller/notification.controller.d.ts +23 -0
  602. package/dist/module/notification/controller/notification.controller.js +74 -0
  603. package/dist/module/notification/controller/notification.controller.js.map +1 -0
  604. package/dist/module/notification/controller/otp.controller.d.ts +56 -0
  605. package/dist/module/notification/controller/otp.controller.js +103 -0
  606. package/dist/module/notification/controller/otp.controller.js.map +1 -0
  607. package/dist/module/notification/entity/notification.entity.d.ts +9 -0
  608. package/dist/module/notification/entity/notification.entity.js +45 -0
  609. package/dist/module/notification/entity/notification.entity.js.map +1 -0
  610. package/dist/module/notification/entity/otp.entity.d.ts +10 -0
  611. package/dist/module/notification/entity/otp.entity.js +52 -0
  612. package/dist/module/notification/entity/otp.entity.js.map +1 -0
  613. package/dist/module/notification/firebase-admin.config.d.ts +7 -0
  614. package/dist/module/notification/firebase-admin.config.js +24 -0
  615. package/dist/module/notification/firebase-admin.config.js.map +1 -0
  616. package/dist/module/notification/notification.module.d.ts +2 -0
  617. package/dist/module/notification/notification.module.js +82 -0
  618. package/dist/module/notification/notification.module.js.map +1 -0
  619. package/dist/module/notification/repository/otp.repository.d.ts +9 -0
  620. package/dist/module/notification/repository/otp.repository.js +44 -0
  621. package/dist/module/notification/repository/otp.repository.js.map +1 -0
  622. package/dist/module/notification/service/email.service.d.ts +14 -0
  623. package/dist/module/notification/service/email.service.js +110 -0
  624. package/dist/module/notification/service/email.service.js.map +1 -0
  625. package/dist/module/notification/service/notification.service.d.ts +25 -0
  626. package/dist/module/notification/service/notification.service.js +117 -0
  627. package/dist/module/notification/service/notification.service.js.map +1 -0
  628. package/dist/module/notification/service/otp.service.d.ts +52 -0
  629. package/dist/module/notification/service/otp.service.js +105 -0
  630. package/dist/module/notification/service/otp.service.js.map +1 -0
  631. package/dist/module/third-party-module/entity/third-party-api-registry.entity.d.ts +18 -0
  632. package/dist/module/third-party-module/entity/third-party-api-registry.entity.js +84 -0
  633. package/dist/module/third-party-module/entity/third-party-api-registry.entity.js.map +1 -0
  634. package/dist/module/third-party-module/repository/third-party-api-registry.repository.d.ts +7 -0
  635. package/dist/module/third-party-module/repository/third-party-api-registry.repository.js +38 -0
  636. package/dist/module/third-party-module/repository/third-party-api-registry.repository.js.map +1 -0
  637. package/dist/module/third-party-module/service/api-registry.service.d.ts +6 -0
  638. package/dist/module/third-party-module/service/api-registry.service.js +28 -0
  639. package/dist/module/third-party-module/service/api-registry.service.js.map +1 -0
  640. package/dist/module/third-party-module/third-party.module.d.ts +2 -0
  641. package/dist/module/third-party-module/third-party.module.js +25 -0
  642. package/dist/module/third-party-module/third-party.module.js.map +1 -0
  643. package/dist/module/user/controller/login.controller.d.ts +26 -0
  644. package/dist/module/user/controller/login.controller.js +176 -0
  645. package/dist/module/user/controller/login.controller.js.map +1 -0
  646. package/dist/module/user/controller/user.controller.d.ts +9 -0
  647. package/dist/module/user/controller/user.controller.js +59 -0
  648. package/dist/module/user/controller/user.controller.js.map +1 -0
  649. package/dist/module/user/dto/create-user.dto.d.ts +17 -0
  650. package/dist/module/user/dto/create-user.dto.js +64 -0
  651. package/dist/module/user/dto/create-user.dto.js.map +1 -0
  652. package/dist/module/user/dto/update-user.dto.d.ts +5 -0
  653. package/dist/module/user/dto/update-user.dto.js +9 -0
  654. package/dist/module/user/dto/update-user.dto.js.map +1 -0
  655. package/dist/module/user/entity/role.entity.d.ts +11 -0
  656. package/dist/module/user/entity/role.entity.js +56 -0
  657. package/dist/module/user/entity/role.entity.js.map +1 -0
  658. package/dist/module/user/entity/user-role-mapping.entity.d.ts +12 -0
  659. package/dist/module/user/entity/user-role-mapping.entity.js +63 -0
  660. package/dist/module/user/entity/user-role-mapping.entity.js.map +1 -0
  661. package/dist/module/user/entity/user-session.entity.d.ts +11 -0
  662. package/dist/module/user/entity/user-session.entity.js +86 -0
  663. package/dist/module/user/entity/user-session.entity.js.map +1 -0
  664. package/dist/module/user/entity/user.entity.d.ts +23 -0
  665. package/dist/module/user/entity/user.entity.js +103 -0
  666. package/dist/module/user/entity/user.entity.js.map +1 -0
  667. package/dist/module/user/repository/role.repository.d.ts +18 -0
  668. package/dist/module/user/repository/role.repository.js +87 -0
  669. package/dist/module/user/repository/role.repository.js.map +1 -0
  670. package/dist/module/user/repository/user-role-mapping.repository.d.ts +19 -0
  671. package/dist/module/user/repository/user-role-mapping.repository.js +110 -0
  672. package/dist/module/user/repository/user-role-mapping.repository.js.map +1 -0
  673. package/dist/module/user/repository/user.repository.d.ts +10 -0
  674. package/dist/module/user/repository/user.repository.js +58 -0
  675. package/dist/module/user/repository/user.repository.js.map +1 -0
  676. package/dist/module/user/repository/userSession.repository.d.ts +10 -0
  677. package/dist/module/user/repository/userSession.repository.js +45 -0
  678. package/dist/module/user/repository/userSession.repository.js.map +1 -0
  679. package/dist/module/user/service/login.service.d.ts +80 -0
  680. package/dist/module/user/service/login.service.js +208 -0
  681. package/dist/module/user/service/login.service.js.map +1 -0
  682. package/dist/module/user/service/role.service.d.ts +23 -0
  683. package/dist/module/user/service/role.service.js +146 -0
  684. package/dist/module/user/service/role.service.js.map +1 -0
  685. package/dist/module/user/service/user-role-mapping.service.d.ts +12 -0
  686. package/dist/module/user/service/user-role-mapping.service.js +60 -0
  687. package/dist/module/user/service/user-role-mapping.service.js.map +1 -0
  688. package/dist/module/user/service/user-session.service.d.ts +38 -0
  689. package/dist/module/user/service/user-session.service.js +132 -0
  690. package/dist/module/user/service/user-session.service.js.map +1 -0
  691. package/dist/module/user/service/user.service.d.ts +38 -0
  692. package/dist/module/user/service/user.service.js +234 -0
  693. package/dist/module/user/service/user.service.js.map +1 -0
  694. package/dist/module/user/user.module.d.ts +2 -0
  695. package/dist/module/user/user.module.js +78 -0
  696. package/dist/module/user/user.module.js.map +1 -0
  697. package/dist/module/workflow/controller/action-category.controller.d.ts +18 -0
  698. package/dist/module/workflow/controller/action-category.controller.js +79 -0
  699. package/dist/module/workflow/controller/action-category.controller.js.map +1 -0
  700. package/dist/module/workflow/controller/action-resource-mapping.controller.d.ts +5 -0
  701. package/dist/module/workflow/controller/action-resource-mapping.controller.js +31 -0
  702. package/dist/module/workflow/controller/action-resource-mapping.controller.js.map +1 -0
  703. package/dist/module/workflow/controller/action-template-mapping.controller.d.ts +12 -0
  704. package/dist/module/workflow/controller/action-template-mapping.controller.js +44 -0
  705. package/dist/module/workflow/controller/action-template-mapping.controller.js.map +1 -0
  706. package/dist/module/workflow/controller/action.controller.d.ts +45 -0
  707. package/dist/module/workflow/controller/action.controller.js +108 -0
  708. package/dist/module/workflow/controller/action.controller.js.map +1 -0
  709. package/dist/module/workflow/controller/activity-log.controller.d.ts +44 -0
  710. package/dist/module/workflow/controller/activity-log.controller.js +62 -0
  711. package/dist/module/workflow/controller/activity-log.controller.js.map +1 -0
  712. package/dist/module/workflow/controller/comm-template.controller.d.ts +13 -0
  713. package/dist/module/workflow/controller/comm-template.controller.js +45 -0
  714. package/dist/module/workflow/controller/comm-template.controller.js.map +1 -0
  715. package/dist/module/workflow/controller/entity-modification.controller.d.ts +8 -0
  716. package/dist/module/workflow/controller/entity-modification.controller.js +44 -0
  717. package/dist/module/workflow/controller/entity-modification.controller.js.map +1 -0
  718. package/dist/module/workflow/controller/form-master.controller.d.ts +11 -0
  719. package/dist/module/workflow/controller/form-master.controller.js +59 -0
  720. package/dist/module/workflow/controller/form-master.controller.js.map +1 -0
  721. package/dist/module/workflow/controller/stage-group.controller.d.ts +19 -0
  722. package/dist/module/workflow/controller/stage-group.controller.js +56 -0
  723. package/dist/module/workflow/controller/stage-group.controller.js.map +1 -0
  724. package/dist/module/workflow/controller/stage.controller.d.ts +16 -0
  725. package/dist/module/workflow/controller/stage.controller.js +57 -0
  726. package/dist/module/workflow/controller/stage.controller.js.map +1 -0
  727. package/dist/module/workflow/controller/task.controller.d.ts +32 -0
  728. package/dist/module/workflow/controller/task.controller.js +72 -0
  729. package/dist/module/workflow/controller/task.controller.js.map +1 -0
  730. package/dist/module/workflow/controller/workflow-list-master.controller.d.ts +14 -0
  731. package/dist/module/workflow/controller/workflow-list-master.controller.js +67 -0
  732. package/dist/module/workflow/controller/workflow-list-master.controller.js.map +1 -0
  733. package/dist/module/workflow/controller/workflow-meta.controller.d.ts +15 -0
  734. package/dist/module/workflow/controller/workflow-meta.controller.js +72 -0
  735. package/dist/module/workflow/controller/workflow-meta.controller.js.map +1 -0
  736. package/dist/module/workflow/controller/workflow.controller.d.ts +31 -0
  737. package/dist/module/workflow/controller/workflow.controller.js +83 -0
  738. package/dist/module/workflow/controller/workflow.controller.js.map +1 -0
  739. package/dist/module/workflow/entity/action-category.entity.d.ts +13 -0
  740. package/dist/module/workflow/entity/action-category.entity.js +63 -0
  741. package/dist/module/workflow/entity/action-category.entity.js.map +1 -0
  742. package/dist/module/workflow/entity/action-data.entity.d.ts +19 -0
  743. package/dist/module/workflow/entity/action-data.entity.js +86 -0
  744. package/dist/module/workflow/entity/action-data.entity.js.map +1 -0
  745. package/dist/module/workflow/entity/action-resources-mapping.entity.d.ts +9 -0
  746. package/dist/module/workflow/entity/action-resources-mapping.entity.js +47 -0
  747. package/dist/module/workflow/entity/action-resources-mapping.entity.js.map +1 -0
  748. package/dist/module/workflow/entity/action-template-mapping.entity.d.ts +6 -0
  749. package/dist/module/workflow/entity/action-template-mapping.entity.js +35 -0
  750. package/dist/module/workflow/entity/action-template-mapping.entity.js.map +1 -0
  751. package/dist/module/workflow/entity/action.entity.d.ts +17 -0
  752. package/dist/module/workflow/entity/action.entity.js +79 -0
  753. package/dist/module/workflow/entity/action.entity.js.map +1 -0
  754. package/dist/module/workflow/entity/activity-log.entity.d.ts +15 -0
  755. package/dist/module/workflow/entity/activity-log.entity.js +70 -0
  756. package/dist/module/workflow/entity/activity-log.entity.js.map +1 -0
  757. package/dist/module/workflow/entity/comm-template.entity.d.ts +14 -0
  758. package/dist/module/workflow/entity/comm-template.entity.js +67 -0
  759. package/dist/module/workflow/entity/comm-template.entity.js.map +1 -0
  760. package/dist/module/workflow/entity/entity-modification.entity.d.ts +13 -0
  761. package/dist/module/workflow/entity/entity-modification.entity.js +63 -0
  762. package/dist/module/workflow/entity/entity-modification.entity.js.map +1 -0
  763. package/dist/module/workflow/entity/form.entity.d.ts +9 -0
  764. package/dist/module/workflow/entity/form.entity.js +46 -0
  765. package/dist/module/workflow/entity/form.entity.js.map +1 -0
  766. package/dist/module/workflow/entity/stage-action-mapping.entity.d.ts +6 -0
  767. package/dist/module/workflow/entity/stage-action-mapping.entity.js +35 -0
  768. package/dist/module/workflow/entity/stage-action-mapping.entity.js.map +1 -0
  769. package/dist/module/workflow/entity/stage-group.entity.d.ts +8 -0
  770. package/dist/module/workflow/entity/stage-group.entity.js +43 -0
  771. package/dist/module/workflow/entity/stage-group.entity.js.map +1 -0
  772. package/dist/module/workflow/entity/stage-movement-data.entity.d.ts +13 -0
  773. package/dist/module/workflow/entity/stage-movement-data.entity.js +63 -0
  774. package/dist/module/workflow/entity/stage-movement-data.entity.js.map +1 -0
  775. package/dist/module/workflow/entity/stage.entity.d.ts +7 -0
  776. package/dist/module/workflow/entity/stage.entity.js +39 -0
  777. package/dist/module/workflow/entity/stage.entity.js.map +1 -0
  778. package/dist/module/workflow/entity/task-data.entity.d.ts +30 -0
  779. package/dist/module/workflow/entity/task-data.entity.js +130 -0
  780. package/dist/module/workflow/entity/task-data.entity.js.map +1 -0
  781. package/dist/module/workflow/entity/template-attach-mapper.entity.d.ts +11 -0
  782. package/dist/module/workflow/entity/template-attach-mapper.entity.js +54 -0
  783. package/dist/module/workflow/entity/template-attach-mapper.entity.js.map +1 -0
  784. package/dist/module/workflow/entity/workflow-data.entity.d.ts +4 -0
  785. package/dist/module/workflow/entity/workflow-data.entity.js +27 -0
  786. package/dist/module/workflow/entity/workflow-data.entity.js.map +1 -0
  787. package/dist/module/workflow/entity/workflow-level-mapping.entity.d.ts +7 -0
  788. package/dist/module/workflow/entity/workflow-level-mapping.entity.js +38 -0
  789. package/dist/module/workflow/entity/workflow-level-mapping.entity.js.map +1 -0
  790. package/dist/module/workflow/entity/workflow.entity.d.ts +7 -0
  791. package/dist/module/workflow/entity/workflow.entity.js +39 -0
  792. package/dist/module/workflow/entity/workflow.entity.js.map +1 -0
  793. package/dist/module/workflow/repository/action-category.repository.d.ts +19 -0
  794. package/dist/module/workflow/repository/action-category.repository.js +84 -0
  795. package/dist/module/workflow/repository/action-category.repository.js.map +1 -0
  796. package/dist/module/workflow/repository/action-data.repository.d.ts +18 -0
  797. package/dist/module/workflow/repository/action-data.repository.js +172 -0
  798. package/dist/module/workflow/repository/action-data.repository.js.map +1 -0
  799. package/dist/module/workflow/repository/action.repository.d.ts +29 -0
  800. package/dist/module/workflow/repository/action.repository.js +220 -0
  801. package/dist/module/workflow/repository/action.repository.js.map +1 -0
  802. package/dist/module/workflow/repository/activity-log.repository.d.ts +57 -0
  803. package/dist/module/workflow/repository/activity-log.repository.js +112 -0
  804. package/dist/module/workflow/repository/activity-log.repository.js.map +1 -0
  805. package/dist/module/workflow/repository/comm-template.repository.d.ts +15 -0
  806. package/dist/module/workflow/repository/comm-template.repository.js +109 -0
  807. package/dist/module/workflow/repository/comm-template.repository.js.map +1 -0
  808. package/dist/module/workflow/repository/form-master.repository.d.ts +8 -0
  809. package/dist/module/workflow/repository/form-master.repository.js +38 -0
  810. package/dist/module/workflow/repository/form-master.repository.js.map +1 -0
  811. package/dist/module/workflow/repository/form.repository.d.ts +0 -0
  812. package/dist/module/workflow/repository/form.repository.js +1 -0
  813. package/dist/module/workflow/repository/form.repository.js.map +1 -0
  814. package/dist/module/workflow/repository/stage-group.repository.d.ts +34 -0
  815. package/dist/module/workflow/repository/stage-group.repository.js +135 -0
  816. package/dist/module/workflow/repository/stage-group.repository.js.map +1 -0
  817. package/dist/module/workflow/repository/stage-movement.repository.d.ts +23 -0
  818. package/dist/module/workflow/repository/stage-movement.repository.js +150 -0
  819. package/dist/module/workflow/repository/stage-movement.repository.js.map +1 -0
  820. package/dist/module/workflow/repository/stage.repository.d.ts +31 -0
  821. package/dist/module/workflow/repository/stage.repository.js +117 -0
  822. package/dist/module/workflow/repository/stage.repository.js.map +1 -0
  823. package/dist/module/workflow/repository/task.repository.d.ts +10 -0
  824. package/dist/module/workflow/repository/task.repository.js +92 -0
  825. package/dist/module/workflow/repository/task.repository.js.map +1 -0
  826. package/dist/module/workflow/repository/workflow.repository.d.ts +10 -0
  827. package/dist/module/workflow/repository/workflow.repository.js +49 -0
  828. package/dist/module/workflow/repository/workflow.repository.js.map +1 -0
  829. package/dist/module/workflow/service/action-category.service.d.ts +21 -0
  830. package/dist/module/workflow/service/action-category.service.js +42 -0
  831. package/dist/module/workflow/service/action-category.service.js.map +1 -0
  832. package/dist/module/workflow/service/action-data.service.d.ts +16 -0
  833. package/dist/module/workflow/service/action-data.service.js +40 -0
  834. package/dist/module/workflow/service/action-data.service.js.map +1 -0
  835. package/dist/module/workflow/service/action-resources-mapping.service.d.ts +6 -0
  836. package/dist/module/workflow/service/action-resources-mapping.service.js +27 -0
  837. package/dist/module/workflow/service/action-resources-mapping.service.js.map +1 -0
  838. package/dist/module/workflow/service/action-template-mapping.service.d.ts +7 -0
  839. package/dist/module/workflow/service/action-template-mapping.service.js +52 -0
  840. package/dist/module/workflow/service/action-template-mapping.service.js.map +1 -0
  841. package/dist/module/workflow/service/action.service.d.ts +35 -0
  842. package/dist/module/workflow/service/action.service.js +163 -0
  843. package/dist/module/workflow/service/action.service.js.map +1 -0
  844. package/dist/module/workflow/service/activity-log.service.d.ts +44 -0
  845. package/dist/module/workflow/service/activity-log.service.js +92 -0
  846. package/dist/module/workflow/service/activity-log.service.js.map +1 -0
  847. package/dist/module/workflow/service/comm-template.service.d.ts +16 -0
  848. package/dist/module/workflow/service/comm-template.service.js +90 -0
  849. package/dist/module/workflow/service/comm-template.service.js.map +1 -0
  850. package/dist/module/workflow/service/entity-modification.service.d.ts +8 -0
  851. package/dist/module/workflow/service/entity-modification.service.js +52 -0
  852. package/dist/module/workflow/service/entity-modification.service.js.map +1 -0
  853. package/dist/module/workflow/service/form-master.service.d.ts +14 -0
  854. package/dist/module/workflow/service/form-master.service.js +38 -0
  855. package/dist/module/workflow/service/form-master.service.js.map +1 -0
  856. package/dist/module/workflow/service/populate-workflow.service.d.ts +21 -0
  857. package/dist/module/workflow/service/populate-workflow.service.js +167 -0
  858. package/dist/module/workflow/service/populate-workflow.service.js.map +1 -0
  859. package/dist/module/workflow/service/stage-action-mapping.service.d.ts +3 -0
  860. package/dist/module/workflow/service/stage-action-mapping.service.js +18 -0
  861. package/dist/module/workflow/service/stage-action-mapping.service.js.map +1 -0
  862. package/dist/module/workflow/service/stage-group.service.d.ts +29 -0
  863. package/dist/module/workflow/service/stage-group.service.js +213 -0
  864. package/dist/module/workflow/service/stage-group.service.js.map +1 -0
  865. package/dist/module/workflow/service/stage.service.d.ts +25 -0
  866. package/dist/module/workflow/service/stage.service.js +129 -0
  867. package/dist/module/workflow/service/stage.service.js.map +1 -0
  868. package/dist/module/workflow/service/task.service.d.ts +47 -0
  869. package/dist/module/workflow/service/task.service.js +324 -0
  870. package/dist/module/workflow/service/task.service.js.map +1 -0
  871. package/dist/module/workflow/service/workflow-list-master.service.d.ts +9 -0
  872. package/dist/module/workflow/service/workflow-list-master.service.js +61 -0
  873. package/dist/module/workflow/service/workflow-list-master.service.js.map +1 -0
  874. package/dist/module/workflow/service/workflow-meta.service.d.ts +26 -0
  875. package/dist/module/workflow/service/workflow-meta.service.js +356 -0
  876. package/dist/module/workflow/service/workflow-meta.service.js.map +1 -0
  877. package/dist/module/workflow/service/workflow.service.d.ts +33 -0
  878. package/dist/module/workflow/service/workflow.service.js +140 -0
  879. package/dist/module/workflow/service/workflow.service.js.map +1 -0
  880. package/dist/module/workflow/workflow.module.d.ts +2 -0
  881. package/dist/module/workflow/workflow.module.js +184 -0
  882. package/dist/module/workflow/workflow.module.js.map +1 -0
  883. package/dist/module/workflow-automation/controller/workflow-automation.controller.d.ts +5 -0
  884. package/dist/module/workflow-automation/controller/workflow-automation.controller.js +31 -0
  885. package/dist/module/workflow-automation/controller/workflow-automation.controller.js.map +1 -0
  886. package/dist/module/workflow-automation/entity/workflow-automation-action.entity.d.ts +9 -0
  887. package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js +47 -0
  888. package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js.map +1 -0
  889. package/dist/module/workflow-automation/entity/workflow-automation.entity.d.ts +12 -0
  890. package/dist/module/workflow-automation/entity/workflow-automation.entity.js +59 -0
  891. package/dist/module/workflow-automation/entity/workflow-automation.entity.js.map +1 -0
  892. package/dist/module/workflow-automation/interface/action.decorator.d.ts +2 -0
  893. package/dist/module/workflow-automation/interface/action.decorator.js +8 -0
  894. package/dist/module/workflow-automation/interface/action.decorator.js.map +1 -0
  895. package/dist/module/workflow-automation/interface/action.interface.d.ts +4 -0
  896. package/dist/module/workflow-automation/interface/action.interface.js +3 -0
  897. package/dist/module/workflow-automation/interface/action.interface.js.map +1 -0
  898. package/dist/module/workflow-automation/service/action-registery.service.d.ts +11 -0
  899. package/dist/module/workflow-automation/service/action-registery.service.js +46 -0
  900. package/dist/module/workflow-automation/service/action-registery.service.js.map +1 -0
  901. package/dist/module/workflow-automation/service/workflow-automation-engine.service.d.ts +14 -0
  902. package/dist/module/workflow-automation/service/workflow-automation-engine.service.js +116 -0
  903. package/dist/module/workflow-automation/service/workflow-automation-engine.service.js.map +1 -0
  904. package/dist/module/workflow-automation/service/workflow-automation.service.d.ts +55 -0
  905. package/dist/module/workflow-automation/service/workflow-automation.service.js +222 -0
  906. package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -0
  907. package/dist/module/workflow-automation/workflow-automation.module.d.ts +2 -0
  908. package/dist/module/workflow-automation/workflow-automation.module.js +47 -0
  909. package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -0
  910. package/dist/resources/properties.module.d.ts +2 -0
  911. package/dist/resources/properties.module.js +25 -0
  912. package/dist/resources/properties.module.js.map +1 -0
  913. package/dist/resources/properties.yaml.d.ts +2 -0
  914. package/dist/resources/properties.yaml.js +10 -0
  915. package/dist/resources/properties.yaml.js.map +1 -0
  916. package/dist/tsconfig.build.tsbuildinfo +1 -0
  917. package/dist/utils/dto/excel-data.dto.d.ts +7 -0
  918. package/dist/utils/dto/excel-data.dto.js +16 -0
  919. package/dist/utils/dto/excel-data.dto.js.map +1 -0
  920. package/dist/utils/dto/excelsheet-data.dto.d.ts +5 -0
  921. package/dist/utils/dto/excelsheet-data.dto.js +3 -0
  922. package/dist/utils/dto/excelsheet-data.dto.js.map +1 -0
  923. package/dist/utils/service/base64util.service.d.ts +4 -0
  924. package/dist/utils/service/base64util.service.js +21 -0
  925. package/dist/utils/service/base64util.service.js.map +1 -0
  926. package/dist/utils/service/clockIDGenUtil.service.d.ts +8 -0
  927. package/dist/utils/service/clockIDGenUtil.service.js +32 -0
  928. package/dist/utils/service/clockIDGenUtil.service.js.map +1 -0
  929. package/dist/utils/service/codeGenerator.service.d.ts +3 -0
  930. package/dist/utils/service/codeGenerator.service.js +19 -0
  931. package/dist/utils/service/codeGenerator.service.js.map +1 -0
  932. package/dist/utils/service/dateUtil.service.d.ts +3 -0
  933. package/dist/utils/service/dateUtil.service.js +28 -0
  934. package/dist/utils/service/dateUtil.service.js.map +1 -0
  935. package/dist/utils/service/encryptUtil.service.d.ts +9 -0
  936. package/dist/utils/service/encryptUtil.service.js +112 -0
  937. package/dist/utils/service/encryptUtil.service.js.map +1 -0
  938. package/dist/utils/service/excel-helper.service.d.ts +9 -0
  939. package/dist/utils/service/excel-helper.service.js +56 -0
  940. package/dist/utils/service/excel-helper.service.js.map +1 -0
  941. package/dist/utils/service/excelUtil.service.d.ts +3 -0
  942. package/dist/utils/service/excelUtil.service.js +17 -0
  943. package/dist/utils/service/excelUtil.service.js.map +1 -0
  944. package/dist/utils/service/file-util.service.d.ts +3 -0
  945. package/dist/utils/service/file-util.service.js +15 -0
  946. package/dist/utils/service/file-util.service.js.map +1 -0
  947. package/dist/utils/service/json-util.service.d.ts +3 -0
  948. package/dist/utils/service/json-util.service.js +24 -0
  949. package/dist/utils/service/json-util.service.js.map +1 -0
  950. package/dist/utils/service/loggingUtil.service.d.ts +4 -0
  951. package/dist/utils/service/loggingUtil.service.js +36 -0
  952. package/dist/utils/service/loggingUtil.service.js.map +1 -0
  953. package/dist/utils/service/reflection-helper.service.d.ts +10 -0
  954. package/dist/utils/service/reflection-helper.service.js +66 -0
  955. package/dist/utils/service/reflection-helper.service.js.map +1 -0
  956. package/dist/utils/service/wbsCodeGen.service.d.ts +3 -0
  957. package/dist/utils/service/wbsCodeGen.service.js +20 -0
  958. package/dist/utils/service/wbsCodeGen.service.js.map +1 -0
  959. package/dist/utils/utils.module.d.ts +2 -0
  960. package/dist/utils/utils.module.js +38 -0
  961. package/dist/utils/utils.module.js.map +1 -0
  962. package/package.json +1 -1
@@ -0,0 +1,299 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var WrapperService_1;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.WrapperService = void 0;
14
+ const common_1 = require("@nestjs/common");
15
+ const typeorm_1 = require("typeorm");
16
+ const integration_service_1 = require("./integration.service");
17
+ const calendar_event_service_1 = require("./calendar-event.service");
18
+ const ics_service_1 = require("../../ics/service/ics.service");
19
+ let WrapperService = WrapperService_1 = class WrapperService {
20
+ constructor(datasource, integrationService, googleService, icsService) {
21
+ this.datasource = datasource;
22
+ this.integrationService = integrationService;
23
+ this.googleService = googleService;
24
+ this.icsService = icsService;
25
+ this.logger = new common_1.Logger(WrapperService_1.name);
26
+ }
27
+ async sendMailWrapper(payload, loggedInUser) {
28
+ try {
29
+ this.logger.log(`sendMailWrapper called. User: ${JSON.stringify(loggedInUser)}, Payload: ${JSON.stringify(payload)}`);
30
+ const { level_id, level_type, organization_id } = loggedInUser;
31
+ this.logger.debug(`Fetching configs for level_id=${level_id}, level_type=${level_type}`);
32
+ const configs = await this.datasource.query(`SELECT * FROM cr_integration_config
33
+ WHERE level_id = ?
34
+ AND level_type = ?
35
+ AND status = 1
36
+ AND integration_type = 'EMAIL'`, [level_id, level_type]);
37
+ this.logger.debug(`Configs found: ${JSON.stringify(configs)}`);
38
+ let templateCode;
39
+ if (payload.templateCode) {
40
+ this.logger.debug(`Looking up templateCode=${payload.templateCode} for current level`);
41
+ const template = await this.datasource.query(`SELECT rich_text FROM cr_wf_comm_template WHERE code = ? AND level_id = ? AND level_type = ? LIMIT 1`, [payload.templateCode, level_id, level_type]);
42
+ this.logger.debug(`Template lookup result: ${JSON.stringify(template)}`);
43
+ if (template && template.length > 0) {
44
+ templateCode = template[0]?.rich_text;
45
+ }
46
+ else {
47
+ this.logger.warn(`No template found for templateCode=${payload.templateCode} and current level`);
48
+ }
49
+ }
50
+ let payloadSendMail;
51
+ if (configs && configs.length > 0) {
52
+ this.logger.debug(`Using user-level configs`);
53
+ payloadSendMail = {
54
+ levelId: level_id,
55
+ levelType: level_type,
56
+ app_code: 'DEFAULT',
57
+ to: payload.to,
58
+ message: payload.message,
59
+ subject: payload.subject,
60
+ type: 'EMAIL',
61
+ cc: payload.cc,
62
+ bcc: payload.bcc,
63
+ html: payload.html,
64
+ templateId: payload.templateId,
65
+ variables: payload.variables,
66
+ };
67
+ }
68
+ else {
69
+ this.logger.warn(`No user-level configs found. Falling back to ORG-level`);
70
+ const fallbackConfigs = await this.datasource.query(`SELECT * FROM cr_integration_config
71
+ WHERE level_type = 'ORG'
72
+ AND integration_type = 'EMAIL'
73
+ AND status = 1`);
74
+ this.logger.debug(`ORG-level configs: ${JSON.stringify(fallbackConfigs)}`);
75
+ if (!fallbackConfigs || fallbackConfigs.length === 0) {
76
+ this.logger.warn('No active email communication config found');
77
+ }
78
+ payloadSendMail = {
79
+ levelId: 1,
80
+ levelType: 'ORG',
81
+ app_code: 'DEFAULT',
82
+ to: payload.to,
83
+ message: payload.message,
84
+ subject: payload.subject,
85
+ type: 'EMAIL',
86
+ cc: payload.cc,
87
+ bcc: payload.bcc,
88
+ html: payload.html,
89
+ variables: payload.variables,
90
+ };
91
+ }
92
+ this.logger.debug(`Final payload for IntegrationService: ${JSON.stringify(payloadSendMail)}`);
93
+ const result = await this.integrationService.sendGenericMessage(payloadSendMail);
94
+ this.logger.log(`sendMailWrapper SUCCESS. Result: ${JSON.stringify(result)}`);
95
+ return {
96
+ success: true,
97
+ data: result,
98
+ };
99
+ }
100
+ catch (error) {
101
+ this.logger.error(`sendMailWrapper ERROR: ${error.message}`, error.stack);
102
+ return {
103
+ success: false,
104
+ error: error.message,
105
+ };
106
+ }
107
+ }
108
+ async sendCommunicationWrapperService(entity, loggedInUser) {
109
+ try {
110
+ this.logger.log(`sendCommunicationWrapper called. User: ${JSON.stringify(loggedInUser)}, Payload: ${JSON.stringify(entity)}`);
111
+ const { level_id, level_type, appcode, organization_id } = loggedInUser;
112
+ this.logger.debug(`Checking active ${entity.type || 'EMAIL'} configs for level_id=${level_id}, level_type=${level_type}, app_code=${appcode}`);
113
+ let configs = await this.integrationService.getActiveConfigs(level_id, level_type, appcode, entity.type || 'EMAIL');
114
+ let effectiveLevelId = level_id;
115
+ let effectiveLevelType = level_type;
116
+ if (!configs || configs.length === 0) {
117
+ this.logger.warn(`No active configs found for ${level_type}:${level_id}, falling back to ORG-level`);
118
+ configs = await this.integrationService.getActiveConfigs(1, 'ORG', appcode, entity.type || 'EMAIL');
119
+ effectiveLevelId = 1;
120
+ effectiveLevelType = 'ORG';
121
+ }
122
+ if (!configs || configs.length === 0) {
123
+ this.logger.error('No active configurations found at any level.');
124
+ throw new Error('No active configurations found.');
125
+ }
126
+ let resolvedTemplateId = entity?.templateId;
127
+ if (entity.template_code) {
128
+ this.logger.debug(`Looking up template for code=${entity.template_code}, level_id=${level_id}, level_type=${level_type}`);
129
+ let templates = await this.datasource.query(`SELECT id FROM cr_wf_comm_template
130
+ WHERE code = ?
131
+ AND level_id = ?
132
+ AND level_type = ?
133
+ LIMIT 1`, [entity.template_code, level_id, level_type]);
134
+ if (!templates || templates.length === 0) {
135
+ this.logger.warn(`No template found for ${entity.template_code} at provided level. Falling back to ORG-level.`);
136
+ templates = await this.datasource.query(`SELECT id FROM cr_wf_comm_template
137
+ WHERE code = ?
138
+ AND level_type = 'ORG'
139
+ AND organization_id = ?
140
+ LIMIT 1`, [entity.template_code, organization_id]);
141
+ }
142
+ if (templates && templates.length > 0) {
143
+ resolvedTemplateId = templates[0]?.id;
144
+ this.logger.debug(`Template resolved for code=${entity.template_code}, id=${resolvedTemplateId}`);
145
+ }
146
+ else {
147
+ this.logger.warn(`No template found for code=${entity.template_code} at any level.`);
148
+ }
149
+ }
150
+ const mailPayload = {
151
+ to: entity.to,
152
+ subject: entity.subject,
153
+ html: entity.message,
154
+ cc: entity?.cc,
155
+ bcc: entity?.bcc,
156
+ templateId: resolvedTemplateId,
157
+ message: entity.message,
158
+ type: entity.type || 'EMAIL',
159
+ levelId: effectiveLevelId,
160
+ levelType: effectiveLevelType,
161
+ app_code: appcode,
162
+ user_id: loggedInUser.id,
163
+ entity_type: entity.entity_type,
164
+ entity_id: entity.entity_id,
165
+ attachments: entity.attachments,
166
+ mediaUrl: entity.mediaUrl,
167
+ };
168
+ this.logger.debug(`Final payload for sendGenericMessage: ${JSON.stringify(mailPayload)}`);
169
+ const result = await this.integrationService.sendGenericMessage(mailPayload);
170
+ this.logger.log(`sendCommunicationWrapper SUCCESS. Result: ${JSON.stringify(result)}`);
171
+ return result;
172
+ }
173
+ catch (error) {
174
+ this.logger.error(`sendCommunicationWrapper ERROR: ${error.message}`, error.stack);
175
+ return {
176
+ success: false,
177
+ error: error.message,
178
+ };
179
+ }
180
+ }
181
+ async scheduleMeetingWrapper(payload, loggedInUser) {
182
+ try {
183
+ this.logger.log(`scheduleMeetingWrapper called by user=${loggedInUser?.id || 'unknown'} Payload=${JSON.stringify(payload)}`);
184
+ const cleanEmails = (arr = []) => arr.filter((e) => e && e.trim() !== '').map((e) => e.trim());
185
+ const toList = Array.isArray(payload.to) ? cleanEmails(payload.to) : [];
186
+ const ccList = Array.isArray(payload.cc) ? cleanEmails(payload.cc) : [];
187
+ const bccList = Array.isArray(payload.bcc)
188
+ ? cleanEmails(payload.bcc)
189
+ : [];
190
+ payload.attendees = [
191
+ ...toList.map((e) => ({ email: e })),
192
+ ...ccList.map((e) => ({ email: e })),
193
+ ...bccList.map((e) => ({ email: e })),
194
+ ...(payload.attendees || []).flatMap((a) => typeof a === 'string'
195
+ ? [{ email: a }]
196
+ : Array.isArray(a?.email)
197
+ ? a.email.map((e) => ({ email: e }))
198
+ : a?.email
199
+ ? [{ email: a.email }]
200
+ : []),
201
+ ];
202
+ let integrationConfig = await this.integrationService.getSingleActiveConfig(payload.level_id, payload.level_type, payload.app_code, 'EMAIL');
203
+ if (integrationConfig) {
204
+ return {
205
+ success: true,
206
+ data: await this.sendIcsInvite(payload, payload.level_id, payload.level_type, payload.app_code),
207
+ };
208
+ }
209
+ this.logger.log(`No user-level config found, checking ORG-level...`);
210
+ const orgConfigs = await this.datasource.query(`SELECT * FROM cr_integration_config
211
+ WHERE level_id = 1
212
+ AND level_type = 'ORG'
213
+ AND integration_type = 'EMAIL'
214
+ AND app_code ='DEFAULT'
215
+ AND status = 1`, []);
216
+ integrationConfig = await this.integrationService.getSingleActiveConfig(1, 'ORG', 'DEFAULT', 'EMAIL');
217
+ this.logger.debug(`ORG configs found: ${JSON.stringify(orgConfigs)}`);
218
+ if (integrationConfig) {
219
+ return {
220
+ success: true,
221
+ data: await this.sendIcsInvite(payload, 1, 'ORG', 'DEFAULT'),
222
+ };
223
+ }
224
+ }
225
+ catch (error) {
226
+ this.logger.error(`scheduleMeetingWrapper ERROR: ${error.message}`, error.stack);
227
+ return { success: false, error: error.message };
228
+ }
229
+ }
230
+ async getConfigCred(configId) {
231
+ this.logger.debug(`Fetching config JSON for configId=${configId}`);
232
+ const configRes = await this.datasource.query(`SELECT config_json
233
+ FROM cr_integration_config
234
+ WHERE id = ?`, [configId]);
235
+ this.logger.debug(`Config fetch result: ${JSON.stringify(configRes)}`);
236
+ return configRes?.[0]?.config_json || null;
237
+ }
238
+ async sendIcsInvite(payload, levelId, levelType, appCode) {
239
+ this.logger.log(`Generating ICS file. Payload: ${JSON.stringify(payload)}`);
240
+ if (payload.template_code) {
241
+ let templates = await this.datasource.query(`SELECT id FROM cr_wf_comm_template
242
+ WHERE code = ?
243
+ AND level_id = ?
244
+ AND level_type = ?
245
+ LIMIT 1`, [payload.template_code, levelId, levelType]);
246
+ if (templates && templates.length > 0) {
247
+ payload['templateId'] = templates[0].id;
248
+ }
249
+ }
250
+ let activeConfig = await this.integrationService.getSingleActiveConfig(levelId, levelType, appCode, 'EMAIL');
251
+ const base64String = await this.icsService.generateIcs(payload, activeConfig?.config_json);
252
+ this.logger.debug(`ICS generated (base64 length: ${base64String?.length})`);
253
+ const attendeeEmails = payload.attendees?.flatMap((a) => Array.isArray(a.email) ? a.email : [a.email]) || [];
254
+ const toList = [
255
+ ...(Array.isArray(payload.to)
256
+ ? payload.to
257
+ : payload.to
258
+ ? [payload.to]
259
+ : []),
260
+ ...attendeeEmails,
261
+ ];
262
+ const payloadSendMail = {
263
+ levelId,
264
+ levelType,
265
+ app_code: appCode,
266
+ to: toList,
267
+ message: payload.message,
268
+ subject: payload.subject,
269
+ type: 'EMAIL',
270
+ cc: payload.cc,
271
+ bcc: payload.bcc,
272
+ html: payload.html,
273
+ attachments: [
274
+ {
275
+ content: base64String,
276
+ type: 'text/calendar',
277
+ filename: 'invite.ics',
278
+ disposition: 'attachment',
279
+ },
280
+ ],
281
+ templateId: payload.templateId,
282
+ entity_id: payload.entity_id,
283
+ entity_type: payload.entity_type
284
+ };
285
+ this.logger.debug(`Final payload for ICS send: ${JSON.stringify(payloadSendMail)}`);
286
+ const result = await this.integrationService.sendGenericMessage(payloadSendMail);
287
+ this.logger.log(`ICS mail send result: ${JSON.stringify(result)}`);
288
+ return result;
289
+ }
290
+ };
291
+ exports.WrapperService = WrapperService;
292
+ exports.WrapperService = WrapperService = WrapperService_1 = __decorate([
293
+ (0, common_1.Injectable)(),
294
+ __metadata("design:paramtypes", [typeorm_1.DataSource,
295
+ integration_service_1.IntegrationService,
296
+ calendar_event_service_1.GoogleService,
297
+ ics_service_1.IcsMeetingService])
298
+ ], WrapperService);
299
+ //# sourceMappingURL=wrapper.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrapper.service.js","sourceRoot":"","sources":["../../../../src/module/integration/service/wrapper.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,qCAAqC;AACrC,+DAA8E;AAC9E,qEAAyD;AACzD,+DAAuE;AAGhE,IAAM,cAAc,sBAApB,MAAM,cAAc;IAGzB,YACmB,UAAsB,EACtB,kBAAsC,EACtC,aAA4B,EAC5B,UAA6B;QAH7B,eAAU,GAAV,UAAU,CAAY;QACtB,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,kBAAa,GAAb,aAAa,CAAe;QAC5B,eAAU,GAAV,UAAU,CAAmB;QAN/B,WAAM,GAAG,IAAI,eAAM,CAAC,gBAAc,CAAC,IAAI,CAAC,CAAC;IAOvD,CAAC;IAKJ,KAAK,CAAC,eAAe,CAAC,OAAY,EAAE,YAAiB;QACnD,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,iCAAiC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CACrG,CAAC;YAEF,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,YAAY,CAAC;YAG/D,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,iCAAiC,QAAQ,gBAAgB,UAAU,EAAE,CACtE,CAAC;YACF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CACzC;;;;0CAIkC,EAClC,CAAC,QAAQ,EAAE,UAAU,CAAC,CACvB,CAAC;YACF,IAAI,CAAC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E;oBACV,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;oBACd,CAAC,CAAC,EAAE,CAAC;YACT,GAAG,cAAc;SAClB,CAAC;QAEF,MAAM,eAAe,GAAsB;YACzC,OAAO;YACP,SAAS;YACT,QAAQ,EAAE,OAAO;YACjB,EAAE,EAAE,MAAM;YACV,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,OAAO;YACb,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE;gBACX;oBACE,OAAO,EAAE,YAAY;oBACrB,IAAI,EAAE,eAAe;oBACrB,QAAQ,EAAE,YAAY;oBACtB,WAAW,EAAE,YAAY;iBAC1B;aACF;YACD,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;SACjC,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,+BAA+B,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CACjE,CAAC;QACF,MAAM,MAAM,GACV,MAAM,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAC;QACpE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACnE,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AA9bY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAKoB,oBAAU;QACF,wCAAkB;QACvB,sCAAa;QAChB,+BAAiB;GAPrC,cAAc,CA8b1B"}
@@ -0,0 +1,13 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { IntegrationStrategy, IntegrationResult } from '../integration.strategy';
3
+ export declare class GmailApiStrategy implements IntegrationStrategy {
4
+ private readonly configService;
5
+ constructor(configService: ConfigService);
6
+ sendMessage(to: string | string[], message: string, config: any): Promise<IntegrationResult>;
7
+ validateConfig(config: any): boolean;
8
+ private setupOAuth2Client;
9
+ refreshAccessToken(config: any): Promise<string>;
10
+ validateConnection(config: any): Promise<boolean>;
11
+ private buildSimpleEmail;
12
+ private buildMultipartEmail;
13
+ }
@@ -0,0 +1,195 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.GmailApiStrategy = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const config_1 = require("@nestjs/config");
15
+ const googleapis_1 = require("googleapis");
16
+ let GmailApiStrategy = class GmailApiStrategy {
17
+ constructor(configService) {
18
+ this.configService = configService;
19
+ }
20
+ async sendMessage(to, message, config) {
21
+ try {
22
+ if (!config || !config.refreshToken) {
23
+ throw new Error('Invalid Gmail API configuration - missing refresh token');
24
+ }
25
+ const { subject, cc, bcc, attachments } = config;
26
+ console.log('---- Using Google SDK Gmail API ----');
27
+ const oauth2Client = await this.setupOAuth2Client(config);
28
+ const gmail = googleapis_1.google.gmail({ version: 'v1', auth: oauth2Client });
29
+ const toRecipients = Array.isArray(to) ? to.join(', ') : to;
30
+ const ccRecipients = cc
31
+ ? Array.isArray(cc)
32
+ ? cc.join(', ')
33
+ : cc
34
+ : undefined;
35
+ const bccRecipients = bcc
36
+ ? Array.isArray(bcc)
37
+ ? bcc.join(', ')
38
+ : bcc
39
+ : undefined;
40
+ const emailContent = attachments && attachments.length > 0
41
+ ? this.buildMultipartEmail(toRecipients, ccRecipients, bccRecipients, subject, config.richText || message, attachments)
42
+ : this.buildSimpleEmail(toRecipients, ccRecipients, bccRecipients, subject, config.richText || message);
43
+ const encodedMessage = Buffer.from(emailContent)
44
+ .toString('base64')
45
+ .replace(/\+/g, '-')
46
+ .replace(/\//g, '_')
47
+ .replace(/=+$/, '');
48
+ const result = await gmail.users.messages.send({
49
+ userId: 'me',
50
+ requestBody: {
51
+ raw: encodedMessage,
52
+ },
53
+ });
54
+ const credentials = oauth2Client.credentials;
55
+ const freshAccessToken = credentials.access_token;
56
+ return {
57
+ success: true,
58
+ messageId: result.data.id || undefined,
59
+ provider: 'gmail',
60
+ service: 'API',
61
+ timestamp: new Date(),
62
+ message: "Email sent successfully"
63
+ };
64
+ }
65
+ catch (error) {
66
+ console.error('---- Gmail SDK API Error ----');
67
+ console.error('Error message:', error.message);
68
+ console.error('Error details:', error.response?.data || error.errors);
69
+ return {
70
+ success: false,
71
+ provider: 'gmail',
72
+ service: 'API',
73
+ error: error.response?.data?.error?.message ||
74
+ error.message ||
75
+ 'Gmail API error',
76
+ timestamp: new Date(),
77
+ };
78
+ }
79
+ }
80
+ validateConfig(config) {
81
+ if (!config)
82
+ return false;
83
+ return config.refreshToken && typeof config.refreshToken === 'string';
84
+ }
85
+ async setupOAuth2Client(config) {
86
+ try {
87
+ const { refreshToken } = config;
88
+ if (!refreshToken) {
89
+ throw new Error('Missing refresh token for OAuth2 setup');
90
+ }
91
+ const clientId = this.configService.get('CLIENT_ID');
92
+ const clientSecret = this.configService.get('CLIENT_SECRET');
93
+ const callbackurl = this.configService.get('CALLBACK_URL');
94
+ if (!clientId || !clientSecret) {
95
+ throw new Error('Gmail OAuth system credentials not configured');
96
+ }
97
+ console.log('---- Setting up OAuth2 client with Google SDK ----');
98
+ const oauth2Client = new googleapis_1.google.auth.OAuth2(clientId, clientSecret, callbackurl);
99
+ oauth2Client.setCredentials({
100
+ refresh_token: refreshToken,
101
+ });
102
+ await oauth2Client.getAccessToken();
103
+ console.log('---- OAuth2 client setup completed ----');
104
+ return oauth2Client;
105
+ }
106
+ catch (error) {
107
+ console.error('Failed to setup OAuth2 client:', error.message);
108
+ throw new Error(`Failed to setup Gmail OAuth2 client: ${error.message}`);
109
+ }
110
+ }
111
+ async refreshAccessToken(config) {
112
+ try {
113
+ const oauth2Client = await this.setupOAuth2Client(config);
114
+ const { token } = await oauth2Client.getAccessToken();
115
+ if (!token) {
116
+ throw new Error('No access token received from OAuth2 client');
117
+ }
118
+ console.log('---- Token refreshed successfully via Google SDK ----');
119
+ return token;
120
+ }
121
+ catch (error) {
122
+ console.error('Failed to refresh access token via Google SDK:', error.message);
123
+ throw new Error(`Failed to refresh Gmail access token: ${error.message}`);
124
+ }
125
+ }
126
+ async validateConnection(config) {
127
+ try {
128
+ if (!this.validateConfig(config)) {
129
+ return false;
130
+ }
131
+ const oauth2Client = await this.setupOAuth2Client(config);
132
+ const gmail = googleapis_1.google.gmail({ version: 'v1', auth: oauth2Client });
133
+ const profile = await gmail.users.getProfile({
134
+ userId: 'me',
135
+ });
136
+ return !!(profile.data && profile.data.emailAddress);
137
+ }
138
+ catch (error) {
139
+ console.error('Gmail connection validation failed:', error.message);
140
+ return false;
141
+ }
142
+ }
143
+ buildSimpleEmail(to, cc, bcc, subject, message) {
144
+ const emailLines = [`To: ${to}`, `Subject: ${subject || 'Notification'}`];
145
+ if (cc) {
146
+ emailLines.push(`Cc: ${cc}`);
147
+ }
148
+ if (bcc) {
149
+ emailLines.push(`Bcc: ${bcc}`);
150
+ }
151
+ emailLines.push('Content-Type: text/html; charset=utf-8');
152
+ emailLines.push('');
153
+ emailLines.push(message || '');
154
+ return emailLines.join('\n');
155
+ }
156
+ buildMultipartEmail(to, cc, bcc, subject, message, attachments) {
157
+ const boundary = `----GmailBoundary${Date.now()}${Math.random().toString(36).substr(2, 9)}`;
158
+ const emailLines = [`To: ${to}`, `Subject: ${subject || 'Notification'}`];
159
+ if (cc) {
160
+ emailLines.push(`Cc: ${cc}`);
161
+ }
162
+ if (bcc) {
163
+ emailLines.push(`Bcc: ${bcc}`);
164
+ }
165
+ emailLines.push(`Content-Type: multipart/mixed; boundary="${boundary}"`);
166
+ emailLines.push('');
167
+ emailLines.push(`--${boundary}`);
168
+ emailLines.push('Content-Type: text/html; charset=utf-8');
169
+ emailLines.push('');
170
+ emailLines.push(message || '');
171
+ if (attachments) {
172
+ for (const attachment of attachments) {
173
+ emailLines.push(`--${boundary}`);
174
+ emailLines.push(`Content-Type: ${attachment.contentType}`);
175
+ emailLines.push(`Content-Disposition: ${attachment.disposition || 'attachment'}; filename="${attachment.filename}"`);
176
+ emailLines.push('Content-Transfer-Encoding: base64');
177
+ if (attachment.contentId) {
178
+ emailLines.push(`Content-ID: <${attachment.contentId}>`);
179
+ }
180
+ emailLines.push('');
181
+ const base64Content = attachment.content;
182
+ const chunks = base64Content.match(/.{1,76}/g) || [];
183
+ emailLines.push(...chunks);
184
+ }
185
+ }
186
+ emailLines.push(`--${boundary}--`);
187
+ return emailLines.join('\n');
188
+ }
189
+ };
190
+ exports.GmailApiStrategy = GmailApiStrategy;
191
+ exports.GmailApiStrategy = GmailApiStrategy = __decorate([
192
+ (0, common_1.Injectable)(),
193
+ __metadata("design:paramtypes", [config_1.ConfigService])
194
+ ], GmailApiStrategy);
195
+ //# sourceMappingURL=gmail-api.strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gmail-api.strategy.js","sourceRoot":"","sources":["../../../../../src/module/integration/strategies/email/gmail-api.strategy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA+C;AAC/C,2CAAoC;AAS7B,IAAM,gBAAgB,GAAtB,MAAM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AU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAGpB,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC;gBACzC,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;gBACrD,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;QAED,UAAU,CAAC,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC;QAEnC,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF,CAAA;AA7QY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;qCAEiC,sBAAa;GAD9C,gBAAgB,CA6Q5B"}
@@ -0,0 +1,5 @@
1
+ import { IntegrationStrategy, IntegrationResult } from '../integration.strategy';
2
+ export declare class OutlookApiStrategy implements IntegrationStrategy {
3
+ sendMessage(to: string, message: string, config: any): Promise<IntegrationResult>;
4
+ validateConfig(config: any): boolean;
5
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.OutlookApiStrategy = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ let OutlookApiStrategy = class OutlookApiStrategy {
12
+ async sendMessage(to, message, config) {
13
+ try {
14
+ if (!this.validateConfig(config)) {
15
+ throw new Error('Invalid Outlook API configuration');
16
+ }
17
+ console.log('Sending email via Outlook API to:', to);
18
+ return {
19
+ success: true,
20
+ messageId: `outlook-${Date.now()}`,
21
+ provider: 'outlook',
22
+ service: 'API',
23
+ timestamp: new Date(),
24
+ };
25
+ }
26
+ catch (error) {
27
+ return {
28
+ success: false,
29
+ provider: 'outlook',
30
+ service: 'API',
31
+ error: error.message,
32
+ timestamp: new Date(),
33
+ };
34
+ }
35
+ }
36
+ validateConfig(config) {
37
+ return config && config.clientId && config.clientSecret && config.tenantId;
38
+ }
39
+ };
40
+ exports.OutlookApiStrategy = OutlookApiStrategy;
41
+ exports.OutlookApiStrategy = OutlookApiStrategy = __decorate([
42
+ (0, common_1.Injectable)()
43
+ ], OutlookApiStrategy);
44
+ //# sourceMappingURL=outlook-api.strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outlook-api.strategy.js","sourceRoot":"","sources":["../../../../../src/module/integration/strategies/email/outlook-api.strategy.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAOrC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,KAAK,CAAC,WAAW,CACf,EAAU,EACV,OAAe,EACf,MAAW;QAEX,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;gBACjC,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;YACvD,CAAC;YAID,OAAO,CAAC,GAAG,CAAC,mCAAmC,EAAE,EAAE,CAAC,CAAC;YAErD,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,WAAW,IAAI,CAAC,GAAG,EAAE,EAAE;gBAClC,QAAQ,EAAE,SAAS;gBACnB,OAAO,EAAE,KAAK;gBACd,SAAS,EAAE,IAAI,IAAI,EAAE;aACtB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,SAAS;gBACnB,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,KAAK,CAAC,OAAO;gBACpB,SAAS,EAAE,IAAI,IAAI,EAAE;aACtB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,cAAc,CAAC,MAAW;QACxB,OAAO,MAAM,IAAI,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC,QAAQ,CAAC;IAC7E,CAAC;CACF,CAAA;AApCY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;GACA,kBAAkB,CAoC9B"}
@@ -0,0 +1,5 @@
1
+ import { IntegrationStrategy, IntegrationResult } from '../integration.strategy';
2
+ export declare class OutlookStrategy implements IntegrationStrategy {
3
+ sendMessage(to: string, message: string, config: any): Promise<IntegrationResult>;
4
+ validateConfig(config: any): boolean;
5
+ }