rez_core 3.1.40 → 3.1.42

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 (950) 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 +245 -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 +38 -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 +66 -0
  149. package/dist/module/filter/service/filter.service.js +641 -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 +139 -0
  170. package/dist/module/integration/controller/integration.controller.js +540 -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 +56 -0
  174. package/dist/module/integration/controller/wrapper.controller.js.map +1 -0
  175. package/dist/module/integration/dto/create-config.dto.d.ts +208 -0
  176. package/dist/module/integration/dto/create-config.dto.js +461 -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-ivr-mapper.entity.d.ts +6 -0
  182. package/dist/module/integration/entity/integration-ivr-mapper.entity.js +33 -0
  183. package/dist/module/integration/entity/integration-ivr-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 +87 -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-queue.service.d.ts +40 -0
  218. package/dist/module/integration/service/integration-queue.service.js +147 -0
  219. package/dist/module/integration/service/integration-queue.service.js.map +1 -0
  220. package/dist/module/integration/service/integration.service.d.ts +165 -0
  221. package/dist/module/integration/service/integration.service.js +1362 -0
  222. package/dist/module/integration/service/integration.service.js.map +1 -0
  223. package/dist/module/integration/service/oauth.service.d.ts +18 -0
  224. package/dist/module/integration/service/oauth.service.js +190 -0
  225. package/dist/module/integration/service/oauth.service.js.map +1 -0
  226. package/dist/module/integration/service/wrapper.service.d.ts +32 -0
  227. package/dist/module/integration/service/wrapper.service.js +253 -0
  228. package/dist/module/integration/service/wrapper.service.js.map +1 -0
  229. package/dist/module/integration/strategies/email/gmail-api.strategy.d.ts +13 -0
  230. package/dist/module/integration/strategies/email/gmail-api.strategy.js +198 -0
  231. package/dist/module/integration/strategies/email/gmail-api.strategy.js.map +1 -0
  232. package/dist/module/integration/strategies/email/outlook-api.strategy.d.ts +5 -0
  233. package/dist/module/integration/strategies/email/outlook-api.strategy.js +44 -0
  234. package/dist/module/integration/strategies/email/outlook-api.strategy.js.map +1 -0
  235. package/dist/module/integration/strategies/email/outlook.strategy.d.ts +5 -0
  236. package/dist/module/integration/strategies/email/outlook.strategy.js +64 -0
  237. package/dist/module/integration/strategies/email/outlook.strategy.js.map +1 -0
  238. package/dist/module/integration/strategies/email/sendgrid-api.strategy.d.ts +22 -0
  239. package/dist/module/integration/strategies/email/sendgrid-api.strategy.js +203 -0
  240. package/dist/module/integration/strategies/email/sendgrid-api.strategy.js.map +1 -0
  241. package/dist/module/integration/strategies/integration.strategy.d.ts +30 -0
  242. package/dist/module/integration/strategies/integration.strategy.js +40 -0
  243. package/dist/module/integration/strategies/integration.strategy.js.map +1 -0
  244. package/dist/module/integration/strategies/sms/gupshup-sms.strategy.d.ts +9 -0
  245. package/dist/module/integration/strategies/sms/gupshup-sms.strategy.js +104 -0
  246. package/dist/module/integration/strategies/sms/gupshup-sms.strategy.js.map +1 -0
  247. package/dist/module/integration/strategies/sms/msg91-sms.strategy.d.ts +9 -0
  248. package/dist/module/integration/strategies/sms/msg91-sms.strategy.js +113 -0
  249. package/dist/module/integration/strategies/sms/msg91-sms.strategy.js.map +1 -0
  250. package/dist/module/integration/strategies/sms/tubelight-sms.strategy.d.ts +9 -0
  251. package/dist/module/integration/strategies/sms/tubelight-sms.strategy.js +109 -0
  252. package/dist/module/integration/strategies/sms/tubelight-sms.strategy.js.map +1 -0
  253. package/dist/module/integration/strategies/telephone/ozonetel-voice.strategy.d.ts +22 -0
  254. package/dist/module/integration/strategies/telephone/ozonetel-voice.strategy.js +162 -0
  255. package/dist/module/integration/strategies/telephone/ozonetel-voice.strategy.js.map +1 -0
  256. package/dist/module/integration/strategies/telephone/tubelight-voice.strategy.d.ts +17 -0
  257. package/dist/module/integration/strategies/telephone/tubelight-voice.strategy.js +100 -0
  258. package/dist/module/integration/strategies/telephone/tubelight-voice.strategy.js.map +1 -0
  259. package/dist/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.d.ts +19 -0
  260. package/dist/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.js +257 -0
  261. package/dist/module/integration/strategies/whatsapp/gupshup-whatsapp.strategy.js.map +1 -0
  262. package/dist/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.d.ts +22 -0
  263. package/dist/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.js +295 -0
  264. package/dist/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.js.map +1 -0
  265. package/dist/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.d.ts +20 -0
  266. package/dist/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.js +264 -0
  267. package/dist/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.js.map +1 -0
  268. package/dist/module/integration/strategies/whatsapp/whatsapp.strategy.d.ts +5 -0
  269. package/dist/module/integration/strategies/whatsapp/whatsapp.strategy.js +57 -0
  270. package/dist/module/integration/strategies/whatsapp/whatsapp.strategy.js.map +1 -0
  271. package/dist/module/layout/controller/layout.controller.d.ts +11 -0
  272. package/dist/module/layout/controller/layout.controller.js +59 -0
  273. package/dist/module/layout/controller/layout.controller.js.map +1 -0
  274. package/dist/module/layout/dto/header.dto.d.ts +0 -0
  275. package/dist/module/layout/dto/header.dto.js +1 -0
  276. package/dist/module/layout/dto/header.dto.js.map +1 -0
  277. package/dist/module/layout/entity/header-items.entity.d.ts +10 -0
  278. package/dist/module/layout/entity/header-items.entity.js +52 -0
  279. package/dist/module/layout/entity/header-items.entity.js.map +1 -0
  280. package/dist/module/layout/entity/header-section.entity.d.ts +7 -0
  281. package/dist/module/layout/entity/header-section.entity.js +40 -0
  282. package/dist/module/layout/entity/header-section.entity.js.map +1 -0
  283. package/dist/module/layout/layout.module.d.ts +2 -0
  284. package/dist/module/layout/layout.module.js +34 -0
  285. package/dist/module/layout/layout.module.js.map +1 -0
  286. package/dist/module/layout/repository/header-items.repository.d.ts +7 -0
  287. package/dist/module/layout/repository/header-items.repository.js +36 -0
  288. package/dist/module/layout/repository/header-items.repository.js.map +1 -0
  289. package/dist/module/layout/repository/header-section.repository.d.ts +8 -0
  290. package/dist/module/layout/repository/header-section.repository.js +39 -0
  291. package/dist/module/layout/repository/header-section.repository.js.map +1 -0
  292. package/dist/module/layout/service/header-section.service.d.ts +8 -0
  293. package/dist/module/layout/service/header-section.service.js +37 -0
  294. package/dist/module/layout/service/header-section.service.js.map +1 -0
  295. package/dist/module/layout_preference/controller/layout_preference.controller.d.ts +13 -0
  296. package/dist/module/layout_preference/controller/layout_preference.controller.js +59 -0
  297. package/dist/module/layout_preference/controller/layout_preference.controller.js.map +1 -0
  298. package/dist/module/layout_preference/dto/layout_preference.dto.d.ts +0 -0
  299. package/dist/module/layout_preference/dto/layout_preference.dto.js +1 -0
  300. package/dist/module/layout_preference/dto/layout_preference.dto.js.map +1 -0
  301. package/dist/module/layout_preference/entity/layout_preference.entity.d.ts +9 -0
  302. package/dist/module/layout_preference/entity/layout_preference.entity.js +50 -0
  303. package/dist/module/layout_preference/entity/layout_preference.entity.js.map +1 -0
  304. package/dist/module/layout_preference/layout_preference.module.d.ts +2 -0
  305. package/dist/module/layout_preference/layout_preference.module.js +31 -0
  306. package/dist/module/layout_preference/layout_preference.module.js.map +1 -0
  307. package/dist/module/layout_preference/repository/layout_preference.repository.d.ts +7 -0
  308. package/dist/module/layout_preference/repository/layout_preference.repository.js +42 -0
  309. package/dist/module/layout_preference/repository/layout_preference.repository.js.map +1 -0
  310. package/dist/module/layout_preference/service/layout_preference.service.d.ts +15 -0
  311. package/dist/module/layout_preference/service/layout_preference.service.js +99 -0
  312. package/dist/module/layout_preference/service/layout_preference.service.js.map +1 -0
  313. package/dist/module/lead/controller/lead.controller.d.ts +20 -0
  314. package/dist/module/lead/controller/lead.controller.js +58 -0
  315. package/dist/module/lead/controller/lead.controller.js.map +1 -0
  316. package/dist/module/lead/lead.module.d.ts +2 -0
  317. package/dist/module/lead/lead.module.js +26 -0
  318. package/dist/module/lead/lead.module.js.map +1 -0
  319. package/dist/module/lead/repository/lead.repository.d.ts +10 -0
  320. package/dist/module/lead/repository/lead.repository.js +53 -0
  321. package/dist/module/lead/repository/lead.repository.js.map +1 -0
  322. package/dist/module/lead/service/lead.service.d.ts +20 -0
  323. package/dist/module/lead/service/lead.service.js +55 -0
  324. package/dist/module/lead/service/lead.service.js.map +1 -0
  325. package/dist/module/listmaster/controller/list-master.controller.d.ts +24 -0
  326. package/dist/module/listmaster/controller/list-master.controller.js +124 -0
  327. package/dist/module/listmaster/controller/list-master.controller.js.map +1 -0
  328. package/dist/module/listmaster/entity/list-master-items.entity.d.ts +14 -0
  329. package/dist/module/listmaster/entity/list-master-items.entity.js +67 -0
  330. package/dist/module/listmaster/entity/list-master-items.entity.js.map +1 -0
  331. package/dist/module/listmaster/entity/list-master.entity.d.ts +11 -0
  332. package/dist/module/listmaster/entity/list-master.entity.js +55 -0
  333. package/dist/module/listmaster/entity/list-master.entity.js.map +1 -0
  334. package/dist/module/listmaster/listmaster.module.d.ts +2 -0
  335. package/dist/module/listmaster/listmaster.module.js +43 -0
  336. package/dist/module/listmaster/listmaster.module.js.map +1 -0
  337. package/dist/module/listmaster/repository/list-master-items.repository.d.ts +21 -0
  338. package/dist/module/listmaster/repository/list-master-items.repository.js +142 -0
  339. package/dist/module/listmaster/repository/list-master-items.repository.js.map +1 -0
  340. package/dist/module/listmaster/repository/list-master.repository.d.ts +9 -0
  341. package/dist/module/listmaster/repository/list-master.repository.js +53 -0
  342. package/dist/module/listmaster/repository/list-master.repository.js.map +1 -0
  343. package/dist/module/listmaster/service/list-master-item.service.d.ts +19 -0
  344. package/dist/module/listmaster/service/list-master-item.service.js +151 -0
  345. package/dist/module/listmaster/service/list-master-item.service.js.map +1 -0
  346. package/dist/module/listmaster/service/list-master.service.d.ts +32 -0
  347. package/dist/module/listmaster/service/list-master.service.js +228 -0
  348. package/dist/module/listmaster/service/list-master.service.js.map +1 -0
  349. package/dist/module/mapper/controller/field-mapper.controller.d.ts +7 -0
  350. package/dist/module/mapper/controller/field-mapper.controller.js +58 -0
  351. package/dist/module/mapper/controller/field-mapper.controller.js.map +1 -0
  352. package/dist/module/mapper/controller/mapper.controller.d.ts +6 -0
  353. package/dist/module/mapper/controller/mapper.controller.js +39 -0
  354. package/dist/module/mapper/controller/mapper.controller.js.map +1 -0
  355. package/dist/module/mapper/dto/field-mapper.dto.d.ts +11 -0
  356. package/dist/module/mapper/dto/field-mapper.dto.js +8 -0
  357. package/dist/module/mapper/dto/field-mapper.dto.js.map +1 -0
  358. package/dist/module/mapper/entity/field-lovs.entity.d.ts +7 -0
  359. package/dist/module/mapper/entity/field-lovs.entity.js +38 -0
  360. package/dist/module/mapper/entity/field-lovs.entity.js.map +1 -0
  361. package/dist/module/mapper/entity/field-mapper.entity.d.ts +12 -0
  362. package/dist/module/mapper/entity/field-mapper.entity.js +58 -0
  363. package/dist/module/mapper/entity/field-mapper.entity.js.map +1 -0
  364. package/dist/module/mapper/entity/mapper.entity.d.ts +6 -0
  365. package/dist/module/mapper/entity/mapper.entity.js +34 -0
  366. package/dist/module/mapper/entity/mapper.entity.js.map +1 -0
  367. package/dist/module/mapper/mapper.module.d.ts +2 -0
  368. package/dist/module/mapper/mapper.module.js +42 -0
  369. package/dist/module/mapper/mapper.module.js.map +1 -0
  370. package/dist/module/mapper/repository/field-lovs.repository.d.ts +8 -0
  371. package/dist/module/mapper/repository/field-lovs.repository.js +41 -0
  372. package/dist/module/mapper/repository/field-lovs.repository.js.map +1 -0
  373. package/dist/module/mapper/repository/field-mapper.repository.d.ts +9 -0
  374. package/dist/module/mapper/repository/field-mapper.repository.js +42 -0
  375. package/dist/module/mapper/repository/field-mapper.repository.js.map +1 -0
  376. package/dist/module/mapper/service/field-mapper.service.d.ts +20 -0
  377. package/dist/module/mapper/service/field-mapper.service.js +140 -0
  378. package/dist/module/mapper/service/field-mapper.service.js.map +1 -0
  379. package/dist/module/mapper/service/mapper.service.d.ts +7 -0
  380. package/dist/module/mapper/service/mapper.service.js +40 -0
  381. package/dist/module/mapper/service/mapper.service.js.map +1 -0
  382. package/dist/module/master/controller/master.controller.d.ts +20 -0
  383. package/dist/module/master/controller/master.controller.js +82 -0
  384. package/dist/module/master/controller/master.controller.js.map +1 -0
  385. package/dist/module/master/service/master.service.d.ts +31 -0
  386. package/dist/module/master/service/master.service.js +366 -0
  387. package/dist/module/master/service/master.service.js.map +1 -0
  388. package/dist/module/meta/controller/app-master.controller.d.ts +9 -0
  389. package/dist/module/meta/controller/app-master.controller.js +51 -0
  390. package/dist/module/meta/controller/app-master.controller.js.map +1 -0
  391. package/dist/module/meta/controller/attribute-master.controller.d.ts +21 -0
  392. package/dist/module/meta/controller/attribute-master.controller.js +78 -0
  393. package/dist/module/meta/controller/attribute-master.controller.js.map +1 -0
  394. package/dist/module/meta/controller/entity-dynamic.controller.d.ts +18 -0
  395. package/dist/module/meta/controller/entity-dynamic.controller.js +102 -0
  396. package/dist/module/meta/controller/entity-dynamic.controller.js.map +1 -0
  397. package/dist/module/meta/controller/entity-master.controller.d.ts +8 -0
  398. package/dist/module/meta/controller/entity-master.controller.js +44 -0
  399. package/dist/module/meta/controller/entity-master.controller.js.map +1 -0
  400. package/dist/module/meta/controller/entity-relation.controller.d.ts +6 -0
  401. package/dist/module/meta/controller/entity-relation.controller.js +45 -0
  402. package/dist/module/meta/controller/entity-relation.controller.js.map +1 -0
  403. package/dist/module/meta/controller/entity.controller.d.ts +38 -0
  404. package/dist/module/meta/controller/entity.controller.js +245 -0
  405. package/dist/module/meta/controller/entity.controller.js.map +1 -0
  406. package/dist/module/meta/controller/media.controller.d.ts +17 -0
  407. package/dist/module/meta/controller/media.controller.js +79 -0
  408. package/dist/module/meta/controller/media.controller.js.map +1 -0
  409. package/dist/module/meta/controller/meta.controller.d.ts +19 -0
  410. package/dist/module/meta/controller/meta.controller.js +87 -0
  411. package/dist/module/meta/controller/meta.controller.js.map +1 -0
  412. package/dist/module/meta/controller/view-master.controller.d.ts +12 -0
  413. package/dist/module/meta/controller/view-master.controller.js +87 -0
  414. package/dist/module/meta/controller/view-master.controller.js.map +1 -0
  415. package/dist/module/meta/dto/entity-list-data.dto.d.ts +5 -0
  416. package/dist/module/meta/dto/entity-list-data.dto.js +7 -0
  417. package/dist/module/meta/dto/entity-list-data.dto.js.map +1 -0
  418. package/dist/module/meta/dto/entity-tab.dto.d.ts +4 -0
  419. package/dist/module/meta/dto/entity-tab.dto.js +7 -0
  420. package/dist/module/meta/dto/entity-tab.dto.js.map +1 -0
  421. package/dist/module/meta/dto/entity-table.dto.d.ts +11 -0
  422. package/dist/module/meta/dto/entity-table.dto.js +8 -0
  423. package/dist/module/meta/dto/entity-table.dto.js.map +1 -0
  424. package/dist/module/meta/entity/app-master.entity.d.ts +12 -0
  425. package/dist/module/meta/entity/app-master.entity.js +58 -0
  426. package/dist/module/meta/entity/app-master.entity.js.map +1 -0
  427. package/dist/module/meta/entity/attribute-master.entity.d.ts +21 -0
  428. package/dist/module/meta/entity/attribute-master.entity.js +118 -0
  429. package/dist/module/meta/entity/attribute-master.entity.js.map +1 -0
  430. package/dist/module/meta/entity/base-entity.entity.d.ts +19 -0
  431. package/dist/module/meta/entity/base-entity.entity.js +104 -0
  432. package/dist/module/meta/entity/base-entity.entity.js.map +1 -0
  433. package/dist/module/meta/entity/entity-master.entity.d.ts +18 -0
  434. package/dist/module/meta/entity/entity-master.entity.js +108 -0
  435. package/dist/module/meta/entity/entity-master.entity.js.map +1 -0
  436. package/dist/module/meta/entity/entity-relation-data.entity.d.ts +10 -0
  437. package/dist/module/meta/entity/entity-relation-data.entity.js +51 -0
  438. package/dist/module/meta/entity/entity-relation-data.entity.js.map +1 -0
  439. package/dist/module/meta/entity/entity-relation.entity.d.ts +8 -0
  440. package/dist/module/meta/entity/entity-relation.entity.js +43 -0
  441. package/dist/module/meta/entity/entity-relation.entity.js.map +1 -0
  442. package/dist/module/meta/entity/entity-table-column.entity.d.ts +19 -0
  443. package/dist/module/meta/entity/entity-table-column.entity.js +92 -0
  444. package/dist/module/meta/entity/entity-table-column.entity.js.map +1 -0
  445. package/dist/module/meta/entity/entity-table.entity.d.ts +17 -0
  446. package/dist/module/meta/entity/entity-table.entity.js +79 -0
  447. package/dist/module/meta/entity/entity-table.entity.js.map +1 -0
  448. package/dist/module/meta/entity/media-data.entity.d.ts +11 -0
  449. package/dist/module/meta/entity/media-data.entity.js +55 -0
  450. package/dist/module/meta/entity/media-data.entity.js.map +1 -0
  451. package/dist/module/meta/entity/preference.entity.d.ts +11 -0
  452. package/dist/module/meta/entity/preference.entity.js +85 -0
  453. package/dist/module/meta/entity/preference.entity.js.map +1 -0
  454. package/dist/module/meta/entity/view-master.entity.d.ts +14 -0
  455. package/dist/module/meta/entity/view-master.entity.js +67 -0
  456. package/dist/module/meta/entity/view-master.entity.js.map +1 -0
  457. package/dist/module/meta/entity.module.d.ts +2 -0
  458. package/dist/module/meta/entity.module.js +153 -0
  459. package/dist/module/meta/entity.module.js.map +1 -0
  460. package/dist/module/meta/repository/app-master.repository.d.ts +7 -0
  461. package/dist/module/meta/repository/app-master.repository.js +36 -0
  462. package/dist/module/meta/repository/app-master.repository.js.map +1 -0
  463. package/dist/module/meta/repository/attribute-master.repository.d.ts +20 -0
  464. package/dist/module/meta/repository/attribute-master.repository.js +85 -0
  465. package/dist/module/meta/repository/attribute-master.repository.js.map +1 -0
  466. package/dist/module/meta/repository/entity-master.repository.d.ts +9 -0
  467. package/dist/module/meta/repository/entity-master.repository.js +44 -0
  468. package/dist/module/meta/repository/entity-master.repository.js.map +1 -0
  469. package/dist/module/meta/repository/entity-table-column.repository.d.ts +7 -0
  470. package/dist/module/meta/repository/entity-table-column.repository.js +52 -0
  471. package/dist/module/meta/repository/entity-table-column.repository.js.map +1 -0
  472. package/dist/module/meta/repository/entity-table.repository.d.ts +9 -0
  473. package/dist/module/meta/repository/entity-table.repository.js +60 -0
  474. package/dist/module/meta/repository/entity-table.repository.js.map +1 -0
  475. package/dist/module/meta/repository/media-data.repository.d.ts +9 -0
  476. package/dist/module/meta/repository/media-data.repository.js +55 -0
  477. package/dist/module/meta/repository/media-data.repository.js.map +1 -0
  478. package/dist/module/meta/repository/preference.repository.d.ts +7 -0
  479. package/dist/module/meta/repository/preference.repository.js +36 -0
  480. package/dist/module/meta/repository/preference.repository.js.map +1 -0
  481. package/dist/module/meta/repository/user-app-mapping.repository.d.ts +0 -0
  482. package/dist/module/meta/repository/user-app-mapping.repository.js +1 -0
  483. package/dist/module/meta/repository/user-app-mapping.repository.js.map +1 -0
  484. package/dist/module/meta/repository/view-master.repository.d.ts +11 -0
  485. package/dist/module/meta/repository/view-master.repository.js +50 -0
  486. package/dist/module/meta/repository/view-master.repository.js.map +1 -0
  487. package/dist/module/meta/service/app-master.service.d.ts +8 -0
  488. package/dist/module/meta/service/app-master.service.js +45 -0
  489. package/dist/module/meta/service/app-master.service.js.map +1 -0
  490. package/dist/module/meta/service/attribute-master.service.d.ts +16 -0
  491. package/dist/module/meta/service/attribute-master.service.js +75 -0
  492. package/dist/module/meta/service/attribute-master.service.js.map +1 -0
  493. package/dist/module/meta/service/common.service.d.ts +4 -0
  494. package/dist/module/meta/service/common.service.js +25 -0
  495. package/dist/module/meta/service/common.service.js.map +1 -0
  496. package/dist/module/meta/service/entity-dynamic.service.d.ts +19 -0
  497. package/dist/module/meta/service/entity-dynamic.service.js +395 -0
  498. package/dist/module/meta/service/entity-dynamic.service.js.map +1 -0
  499. package/dist/module/meta/service/entity-list.service.d.ts +17 -0
  500. package/dist/module/meta/service/entity-list.service.js +141 -0
  501. package/dist/module/meta/service/entity-list.service.js.map +1 -0
  502. package/dist/module/meta/service/entity-master.service.d.ts +20 -0
  503. package/dist/module/meta/service/entity-master.service.js +106 -0
  504. package/dist/module/meta/service/entity-master.service.js.map +1 -0
  505. package/dist/module/meta/service/entity-realation-data.service.d.ts +4 -0
  506. package/dist/module/meta/service/entity-realation-data.service.js +25 -0
  507. package/dist/module/meta/service/entity-realation-data.service.js.map +1 -0
  508. package/dist/module/meta/service/entity-relation.service.d.ts +8 -0
  509. package/dist/module/meta/service/entity-relation.service.js +58 -0
  510. package/dist/module/meta/service/entity-relation.service.js.map +1 -0
  511. package/dist/module/meta/service/entity-service-impl.service.d.ts +42 -0
  512. package/dist/module/meta/service/entity-service-impl.service.js +267 -0
  513. package/dist/module/meta/service/entity-service-impl.service.js.map +1 -0
  514. package/dist/module/meta/service/entity-table-column.service.d.ts +7 -0
  515. package/dist/module/meta/service/entity-table-column.service.js +37 -0
  516. package/dist/module/meta/service/entity-table-column.service.js.map +1 -0
  517. package/dist/module/meta/service/entity-table.service.d.ts +17 -0
  518. package/dist/module/meta/service/entity-table.service.js +86 -0
  519. package/dist/module/meta/service/entity-table.service.js.map +1 -0
  520. package/dist/module/meta/service/entity-validation.service.d.ts +21 -0
  521. package/dist/module/meta/service/entity-validation.service.js +117 -0
  522. package/dist/module/meta/service/entity-validation.service.js.map +1 -0
  523. package/dist/module/meta/service/entity.service.d.ts +15 -0
  524. package/dist/module/meta/service/entity.service.js +3 -0
  525. package/dist/module/meta/service/entity.service.js.map +1 -0
  526. package/dist/module/meta/service/field-group.service.d.ts +26 -0
  527. package/dist/module/meta/service/field-group.service.js +78 -0
  528. package/dist/module/meta/service/field-group.service.js.map +1 -0
  529. package/dist/module/meta/service/media-data.service.d.ts +29 -0
  530. package/dist/module/meta/service/media-data.service.js +108 -0
  531. package/dist/module/meta/service/media-data.service.js.map +1 -0
  532. package/dist/module/meta/service/populate-meta.service.d.ts +11 -0
  533. package/dist/module/meta/service/populate-meta.service.js +108 -0
  534. package/dist/module/meta/service/populate-meta.service.js.map +1 -0
  535. package/dist/module/meta/service/preference.service.d.ts +7 -0
  536. package/dist/module/meta/service/preference.service.js +31 -0
  537. package/dist/module/meta/service/preference.service.js.map +1 -0
  538. package/dist/module/meta/service/resolver.service.d.ts +9 -0
  539. package/dist/module/meta/service/resolver.service.js +168 -0
  540. package/dist/module/meta/service/resolver.service.js.map +1 -0
  541. package/dist/module/meta/service/section-master.service.d.ts +26 -0
  542. package/dist/module/meta/service/section-master.service.js +77 -0
  543. package/dist/module/meta/service/section-master.service.js.map +1 -0
  544. package/dist/module/meta/service/update-form-json.service.d.ts +9 -0
  545. package/dist/module/meta/service/update-form-json.service.js +39 -0
  546. package/dist/module/meta/service/update-form-json.service.js.map +1 -0
  547. package/dist/module/meta/service/user-app-mapping.service.d.ts +0 -0
  548. package/dist/module/meta/service/user-app-mapping.service.js +1 -0
  549. package/dist/module/meta/service/user-app-mapping.service.js.map +1 -0
  550. package/dist/module/meta/service/view-master.service.d.ts +26 -0
  551. package/dist/module/meta/service/view-master.service.js +58 -0
  552. package/dist/module/meta/service/view-master.service.js.map +1 -0
  553. package/dist/module/module/controller/menu.controller.d.ts +8 -0
  554. package/dist/module/module/controller/menu.controller.js +41 -0
  555. package/dist/module/module/controller/menu.controller.js.map +1 -0
  556. package/dist/module/module/controller/module-access.controller.d.ts +35 -0
  557. package/dist/module/module/controller/module-access.controller.js +148 -0
  558. package/dist/module/module/controller/module-access.controller.js.map +1 -0
  559. package/dist/module/module/entity/menu.entity.d.ts +15 -0
  560. package/dist/module/module/entity/menu.entity.js +72 -0
  561. package/dist/module/module/entity/menu.entity.js.map +1 -0
  562. package/dist/module/module/entity/module-access.entity.d.ts +9 -0
  563. package/dist/module/module/entity/module-access.entity.js +48 -0
  564. package/dist/module/module/entity/module-access.entity.js.map +1 -0
  565. package/dist/module/module/entity/module-action.entity.d.ts +6 -0
  566. package/dist/module/module/entity/module-action.entity.js +37 -0
  567. package/dist/module/module/entity/module-action.entity.js.map +1 -0
  568. package/dist/module/module/entity/module.entity.d.ts +18 -0
  569. package/dist/module/module/entity/module.entity.js +84 -0
  570. package/dist/module/module/entity/module.entity.js.map +1 -0
  571. package/dist/module/module/module.module.d.ts +2 -0
  572. package/dist/module/module/module.module.js +55 -0
  573. package/dist/module/module/module.module.js.map +1 -0
  574. package/dist/module/module/repository/menu.repository.d.ts +11 -0
  575. package/dist/module/module/repository/menu.repository.js +152 -0
  576. package/dist/module/module/repository/menu.repository.js.map +1 -0
  577. package/dist/module/module/repository/module-access.repository.d.ts +51 -0
  578. package/dist/module/module/repository/module-access.repository.js +271 -0
  579. package/dist/module/module/repository/module-access.repository.js.map +1 -0
  580. package/dist/module/module/service/menu.service.d.ts +12 -0
  581. package/dist/module/module/service/menu.service.js +59 -0
  582. package/dist/module/module/service/menu.service.js.map +1 -0
  583. package/dist/module/module/service/module-access.service.d.ts +60 -0
  584. package/dist/module/module/service/module-access.service.js +119 -0
  585. package/dist/module/module/service/module-access.service.js.map +1 -0
  586. package/dist/module/notification/controller/notification.controller.d.ts +23 -0
  587. package/dist/module/notification/controller/notification.controller.js +74 -0
  588. package/dist/module/notification/controller/notification.controller.js.map +1 -0
  589. package/dist/module/notification/controller/otp.controller.d.ts +53 -0
  590. package/dist/module/notification/controller/otp.controller.js +103 -0
  591. package/dist/module/notification/controller/otp.controller.js.map +1 -0
  592. package/dist/module/notification/entity/notification.entity.d.ts +9 -0
  593. package/dist/module/notification/entity/notification.entity.js +45 -0
  594. package/dist/module/notification/entity/notification.entity.js.map +1 -0
  595. package/dist/module/notification/entity/otp.entity.d.ts +10 -0
  596. package/dist/module/notification/entity/otp.entity.js +52 -0
  597. package/dist/module/notification/entity/otp.entity.js.map +1 -0
  598. package/dist/module/notification/firebase-admin.config.d.ts +7 -0
  599. package/dist/module/notification/firebase-admin.config.js +24 -0
  600. package/dist/module/notification/firebase-admin.config.js.map +1 -0
  601. package/dist/module/notification/notification.module.d.ts +2 -0
  602. package/dist/module/notification/notification.module.js +82 -0
  603. package/dist/module/notification/notification.module.js.map +1 -0
  604. package/dist/module/notification/repository/otp.repository.d.ts +9 -0
  605. package/dist/module/notification/repository/otp.repository.js +44 -0
  606. package/dist/module/notification/repository/otp.repository.js.map +1 -0
  607. package/dist/module/notification/service/email.service.d.ts +14 -0
  608. package/dist/module/notification/service/email.service.js +110 -0
  609. package/dist/module/notification/service/email.service.js.map +1 -0
  610. package/dist/module/notification/service/notification.service.d.ts +25 -0
  611. package/dist/module/notification/service/notification.service.js +112 -0
  612. package/dist/module/notification/service/notification.service.js.map +1 -0
  613. package/dist/module/notification/service/otp.service.d.ts +49 -0
  614. package/dist/module/notification/service/otp.service.js +102 -0
  615. package/dist/module/notification/service/otp.service.js.map +1 -0
  616. package/dist/module/third-party-module/entity/third-party-api-registry.entity.d.ts +18 -0
  617. package/dist/module/third-party-module/entity/third-party-api-registry.entity.js +84 -0
  618. package/dist/module/third-party-module/entity/third-party-api-registry.entity.js.map +1 -0
  619. package/dist/module/third-party-module/repository/third-party-api-registry.repository.d.ts +7 -0
  620. package/dist/module/third-party-module/repository/third-party-api-registry.repository.js +38 -0
  621. package/dist/module/third-party-module/repository/third-party-api-registry.repository.js.map +1 -0
  622. package/dist/module/third-party-module/service/api-registry.service.d.ts +6 -0
  623. package/dist/module/third-party-module/service/api-registry.service.js +28 -0
  624. package/dist/module/third-party-module/service/api-registry.service.js.map +1 -0
  625. package/dist/module/third-party-module/third-party.module.d.ts +2 -0
  626. package/dist/module/third-party-module/third-party.module.js +25 -0
  627. package/dist/module/third-party-module/third-party.module.js.map +1 -0
  628. package/dist/module/user/controller/login.controller.d.ts +26 -0
  629. package/dist/module/user/controller/login.controller.js +176 -0
  630. package/dist/module/user/controller/login.controller.js.map +1 -0
  631. package/dist/module/user/controller/user.controller.d.ts +9 -0
  632. package/dist/module/user/controller/user.controller.js +59 -0
  633. package/dist/module/user/controller/user.controller.js.map +1 -0
  634. package/dist/module/user/dto/create-user.dto.d.ts +17 -0
  635. package/dist/module/user/dto/create-user.dto.js +64 -0
  636. package/dist/module/user/dto/create-user.dto.js.map +1 -0
  637. package/dist/module/user/dto/update-user.dto.d.ts +5 -0
  638. package/dist/module/user/dto/update-user.dto.js +9 -0
  639. package/dist/module/user/dto/update-user.dto.js.map +1 -0
  640. package/dist/module/user/entity/role.entity.d.ts +11 -0
  641. package/dist/module/user/entity/role.entity.js +56 -0
  642. package/dist/module/user/entity/role.entity.js.map +1 -0
  643. package/dist/module/user/entity/user-role-mapping.entity.d.ts +12 -0
  644. package/dist/module/user/entity/user-role-mapping.entity.js +63 -0
  645. package/dist/module/user/entity/user-role-mapping.entity.js.map +1 -0
  646. package/dist/module/user/entity/user-session.entity.d.ts +11 -0
  647. package/dist/module/user/entity/user-session.entity.js +86 -0
  648. package/dist/module/user/entity/user-session.entity.js.map +1 -0
  649. package/dist/module/user/entity/user.entity.d.ts +23 -0
  650. package/dist/module/user/entity/user.entity.js +103 -0
  651. package/dist/module/user/entity/user.entity.js.map +1 -0
  652. package/dist/module/user/repository/role.repository.d.ts +18 -0
  653. package/dist/module/user/repository/role.repository.js +87 -0
  654. package/dist/module/user/repository/role.repository.js.map +1 -0
  655. package/dist/module/user/repository/user-role-mapping.repository.d.ts +19 -0
  656. package/dist/module/user/repository/user-role-mapping.repository.js +110 -0
  657. package/dist/module/user/repository/user-role-mapping.repository.js.map +1 -0
  658. package/dist/module/user/repository/user.repository.d.ts +10 -0
  659. package/dist/module/user/repository/user.repository.js +58 -0
  660. package/dist/module/user/repository/user.repository.js.map +1 -0
  661. package/dist/module/user/repository/userSession.repository.d.ts +10 -0
  662. package/dist/module/user/repository/userSession.repository.js +45 -0
  663. package/dist/module/user/repository/userSession.repository.js.map +1 -0
  664. package/dist/module/user/service/login.service.d.ts +80 -0
  665. package/dist/module/user/service/login.service.js +209 -0
  666. package/dist/module/user/service/login.service.js.map +1 -0
  667. package/dist/module/user/service/role.service.d.ts +23 -0
  668. package/dist/module/user/service/role.service.js +146 -0
  669. package/dist/module/user/service/role.service.js.map +1 -0
  670. package/dist/module/user/service/user-role-mapping.service.d.ts +12 -0
  671. package/dist/module/user/service/user-role-mapping.service.js +60 -0
  672. package/dist/module/user/service/user-role-mapping.service.js.map +1 -0
  673. package/dist/module/user/service/user-session.service.d.ts +38 -0
  674. package/dist/module/user/service/user-session.service.js +132 -0
  675. package/dist/module/user/service/user-session.service.js.map +1 -0
  676. package/dist/module/user/service/user.service.d.ts +38 -0
  677. package/dist/module/user/service/user.service.js +234 -0
  678. package/dist/module/user/service/user.service.js.map +1 -0
  679. package/dist/module/user/user.module.d.ts +2 -0
  680. package/dist/module/user/user.module.js +78 -0
  681. package/dist/module/user/user.module.js.map +1 -0
  682. package/dist/module/workflow/controller/action-category.controller.d.ts +18 -0
  683. package/dist/module/workflow/controller/action-category.controller.js +79 -0
  684. package/dist/module/workflow/controller/action-category.controller.js.map +1 -0
  685. package/dist/module/workflow/controller/action-resource-mapping.controller.d.ts +5 -0
  686. package/dist/module/workflow/controller/action-resource-mapping.controller.js +31 -0
  687. package/dist/module/workflow/controller/action-resource-mapping.controller.js.map +1 -0
  688. package/dist/module/workflow/controller/action-template-mapping.controller.d.ts +12 -0
  689. package/dist/module/workflow/controller/action-template-mapping.controller.js +44 -0
  690. package/dist/module/workflow/controller/action-template-mapping.controller.js.map +1 -0
  691. package/dist/module/workflow/controller/action.controller.d.ts +45 -0
  692. package/dist/module/workflow/controller/action.controller.js +108 -0
  693. package/dist/module/workflow/controller/action.controller.js.map +1 -0
  694. package/dist/module/workflow/controller/activity-log.controller.d.ts +44 -0
  695. package/dist/module/workflow/controller/activity-log.controller.js +62 -0
  696. package/dist/module/workflow/controller/activity-log.controller.js.map +1 -0
  697. package/dist/module/workflow/controller/comm-template.controller.d.ts +13 -0
  698. package/dist/module/workflow/controller/comm-template.controller.js +45 -0
  699. package/dist/module/workflow/controller/comm-template.controller.js.map +1 -0
  700. package/dist/module/workflow/controller/entity-modification.controller.d.ts +8 -0
  701. package/dist/module/workflow/controller/entity-modification.controller.js +44 -0
  702. package/dist/module/workflow/controller/entity-modification.controller.js.map +1 -0
  703. package/dist/module/workflow/controller/form-master.controller.d.ts +11 -0
  704. package/dist/module/workflow/controller/form-master.controller.js +59 -0
  705. package/dist/module/workflow/controller/form-master.controller.js.map +1 -0
  706. package/dist/module/workflow/controller/stage-group.controller.d.ts +19 -0
  707. package/dist/module/workflow/controller/stage-group.controller.js +56 -0
  708. package/dist/module/workflow/controller/stage-group.controller.js.map +1 -0
  709. package/dist/module/workflow/controller/stage.controller.d.ts +34 -0
  710. package/dist/module/workflow/controller/stage.controller.js +56 -0
  711. package/dist/module/workflow/controller/stage.controller.js.map +1 -0
  712. package/dist/module/workflow/controller/task.controller.d.ts +32 -0
  713. package/dist/module/workflow/controller/task.controller.js +72 -0
  714. package/dist/module/workflow/controller/task.controller.js.map +1 -0
  715. package/dist/module/workflow/controller/workflow-list-master.controller.d.ts +14 -0
  716. package/dist/module/workflow/controller/workflow-list-master.controller.js +67 -0
  717. package/dist/module/workflow/controller/workflow-list-master.controller.js.map +1 -0
  718. package/dist/module/workflow/controller/workflow-meta.controller.d.ts +15 -0
  719. package/dist/module/workflow/controller/workflow-meta.controller.js +72 -0
  720. package/dist/module/workflow/controller/workflow-meta.controller.js.map +1 -0
  721. package/dist/module/workflow/controller/workflow.controller.d.ts +31 -0
  722. package/dist/module/workflow/controller/workflow.controller.js +83 -0
  723. package/dist/module/workflow/controller/workflow.controller.js.map +1 -0
  724. package/dist/module/workflow/entity/action-category.entity.d.ts +12 -0
  725. package/dist/module/workflow/entity/action-category.entity.js +59 -0
  726. package/dist/module/workflow/entity/action-category.entity.js.map +1 -0
  727. package/dist/module/workflow/entity/action-data.entity.d.ts +19 -0
  728. package/dist/module/workflow/entity/action-data.entity.js +86 -0
  729. package/dist/module/workflow/entity/action-data.entity.js.map +1 -0
  730. package/dist/module/workflow/entity/action-resources-mapping.entity.d.ts +9 -0
  731. package/dist/module/workflow/entity/action-resources-mapping.entity.js +47 -0
  732. package/dist/module/workflow/entity/action-resources-mapping.entity.js.map +1 -0
  733. package/dist/module/workflow/entity/action-template-mapping.entity.d.ts +6 -0
  734. package/dist/module/workflow/entity/action-template-mapping.entity.js +35 -0
  735. package/dist/module/workflow/entity/action-template-mapping.entity.js.map +1 -0
  736. package/dist/module/workflow/entity/action.entity.d.ts +17 -0
  737. package/dist/module/workflow/entity/action.entity.js +79 -0
  738. package/dist/module/workflow/entity/action.entity.js.map +1 -0
  739. package/dist/module/workflow/entity/activity-log.entity.d.ts +15 -0
  740. package/dist/module/workflow/entity/activity-log.entity.js +70 -0
  741. package/dist/module/workflow/entity/activity-log.entity.js.map +1 -0
  742. package/dist/module/workflow/entity/comm-template.entity.d.ts +13 -0
  743. package/dist/module/workflow/entity/comm-template.entity.js +63 -0
  744. package/dist/module/workflow/entity/comm-template.entity.js.map +1 -0
  745. package/dist/module/workflow/entity/entity-modification.entity.d.ts +13 -0
  746. package/dist/module/workflow/entity/entity-modification.entity.js +63 -0
  747. package/dist/module/workflow/entity/entity-modification.entity.js.map +1 -0
  748. package/dist/module/workflow/entity/form-master.entity.d.ts +10 -0
  749. package/dist/module/workflow/entity/form-master.entity.js +50 -0
  750. package/dist/module/workflow/entity/form-master.entity.js.map +1 -0
  751. package/dist/module/workflow/entity/form.entity.d.ts +9 -0
  752. package/dist/module/workflow/entity/form.entity.js +46 -0
  753. package/dist/module/workflow/entity/form.entity.js.map +1 -0
  754. package/dist/module/workflow/entity/stage-action-mapping.entity.d.ts +6 -0
  755. package/dist/module/workflow/entity/stage-action-mapping.entity.js +35 -0
  756. package/dist/module/workflow/entity/stage-action-mapping.entity.js.map +1 -0
  757. package/dist/module/workflow/entity/stage-group.entity.d.ts +8 -0
  758. package/dist/module/workflow/entity/stage-group.entity.js +43 -0
  759. package/dist/module/workflow/entity/stage-group.entity.js.map +1 -0
  760. package/dist/module/workflow/entity/stage-movement-data.entity.d.ts +13 -0
  761. package/dist/module/workflow/entity/stage-movement-data.entity.js +63 -0
  762. package/dist/module/workflow/entity/stage-movement-data.entity.js.map +1 -0
  763. package/dist/module/workflow/entity/stage.entity.d.ts +7 -0
  764. package/dist/module/workflow/entity/stage.entity.js +39 -0
  765. package/dist/module/workflow/entity/stage.entity.js.map +1 -0
  766. package/dist/module/workflow/entity/task-data.entity.d.ts +30 -0
  767. package/dist/module/workflow/entity/task-data.entity.js +130 -0
  768. package/dist/module/workflow/entity/task-data.entity.js.map +1 -0
  769. package/dist/module/workflow/entity/template-attach-mapper.entity.d.ts +11 -0
  770. package/dist/module/workflow/entity/template-attach-mapper.entity.js +54 -0
  771. package/dist/module/workflow/entity/template-attach-mapper.entity.js.map +1 -0
  772. package/dist/module/workflow/entity/workflow-data.entity.d.ts +4 -0
  773. package/dist/module/workflow/entity/workflow-data.entity.js +27 -0
  774. package/dist/module/workflow/entity/workflow-data.entity.js.map +1 -0
  775. package/dist/module/workflow/entity/workflow-level-mapping.entity.d.ts +7 -0
  776. package/dist/module/workflow/entity/workflow-level-mapping.entity.js +38 -0
  777. package/dist/module/workflow/entity/workflow-level-mapping.entity.js.map +1 -0
  778. package/dist/module/workflow/entity/workflow.entity.d.ts +7 -0
  779. package/dist/module/workflow/entity/workflow.entity.js +39 -0
  780. package/dist/module/workflow/entity/workflow.entity.js.map +1 -0
  781. package/dist/module/workflow/repository/action-category.repository.d.ts +19 -0
  782. package/dist/module/workflow/repository/action-category.repository.js +84 -0
  783. package/dist/module/workflow/repository/action-category.repository.js.map +1 -0
  784. package/dist/module/workflow/repository/action-data.repository.d.ts +20 -0
  785. package/dist/module/workflow/repository/action-data.repository.js +176 -0
  786. package/dist/module/workflow/repository/action-data.repository.js.map +1 -0
  787. package/dist/module/workflow/repository/action.repository.d.ts +29 -0
  788. package/dist/module/workflow/repository/action.repository.js +220 -0
  789. package/dist/module/workflow/repository/action.repository.js.map +1 -0
  790. package/dist/module/workflow/repository/activity-log.repository.d.ts +57 -0
  791. package/dist/module/workflow/repository/activity-log.repository.js +112 -0
  792. package/dist/module/workflow/repository/activity-log.repository.js.map +1 -0
  793. package/dist/module/workflow/repository/comm-template.repository.d.ts +15 -0
  794. package/dist/module/workflow/repository/comm-template.repository.js +107 -0
  795. package/dist/module/workflow/repository/comm-template.repository.js.map +1 -0
  796. package/dist/module/workflow/repository/form-master.repository.d.ts +12 -0
  797. package/dist/module/workflow/repository/form-master.repository.js +59 -0
  798. package/dist/module/workflow/repository/form-master.repository.js.map +1 -0
  799. package/dist/module/workflow/repository/form.repository.d.ts +0 -0
  800. package/dist/module/workflow/repository/form.repository.js +1 -0
  801. package/dist/module/workflow/repository/form.repository.js.map +1 -0
  802. package/dist/module/workflow/repository/stage-group.repository.d.ts +34 -0
  803. package/dist/module/workflow/repository/stage-group.repository.js +135 -0
  804. package/dist/module/workflow/repository/stage-group.repository.js.map +1 -0
  805. package/dist/module/workflow/repository/stage-movement.repository.d.ts +23 -0
  806. package/dist/module/workflow/repository/stage-movement.repository.js +150 -0
  807. package/dist/module/workflow/repository/stage-movement.repository.js.map +1 -0
  808. package/dist/module/workflow/repository/stage.repository.d.ts +30 -0
  809. package/dist/module/workflow/repository/stage.repository.js +88 -0
  810. package/dist/module/workflow/repository/stage.repository.js.map +1 -0
  811. package/dist/module/workflow/repository/task.repository.d.ts +10 -0
  812. package/dist/module/workflow/repository/task.repository.js +92 -0
  813. package/dist/module/workflow/repository/task.repository.js.map +1 -0
  814. package/dist/module/workflow/repository/workflow.repository.d.ts +10 -0
  815. package/dist/module/workflow/repository/workflow.repository.js +49 -0
  816. package/dist/module/workflow/repository/workflow.repository.js.map +1 -0
  817. package/dist/module/workflow/service/action-category.service.d.ts +21 -0
  818. package/dist/module/workflow/service/action-category.service.js +42 -0
  819. package/dist/module/workflow/service/action-category.service.js.map +1 -0
  820. package/dist/module/workflow/service/action-data.service.d.ts +16 -0
  821. package/dist/module/workflow/service/action-data.service.js +40 -0
  822. package/dist/module/workflow/service/action-data.service.js.map +1 -0
  823. package/dist/module/workflow/service/action-resources-mapping.service.d.ts +6 -0
  824. package/dist/module/workflow/service/action-resources-mapping.service.js +27 -0
  825. package/dist/module/workflow/service/action-resources-mapping.service.js.map +1 -0
  826. package/dist/module/workflow/service/action-template-mapping.service.d.ts +7 -0
  827. package/dist/module/workflow/service/action-template-mapping.service.js +52 -0
  828. package/dist/module/workflow/service/action-template-mapping.service.js.map +1 -0
  829. package/dist/module/workflow/service/action.service.d.ts +35 -0
  830. package/dist/module/workflow/service/action.service.js +152 -0
  831. package/dist/module/workflow/service/action.service.js.map +1 -0
  832. package/dist/module/workflow/service/activity-log.service.d.ts +44 -0
  833. package/dist/module/workflow/service/activity-log.service.js +92 -0
  834. package/dist/module/workflow/service/activity-log.service.js.map +1 -0
  835. package/dist/module/workflow/service/comm-template.service.d.ts +16 -0
  836. package/dist/module/workflow/service/comm-template.service.js +91 -0
  837. package/dist/module/workflow/service/comm-template.service.js.map +1 -0
  838. package/dist/module/workflow/service/entity-modification.service.d.ts +8 -0
  839. package/dist/module/workflow/service/entity-modification.service.js +52 -0
  840. package/dist/module/workflow/service/entity-modification.service.js.map +1 -0
  841. package/dist/module/workflow/service/form-master.service.d.ts +14 -0
  842. package/dist/module/workflow/service/form-master.service.js +38 -0
  843. package/dist/module/workflow/service/form-master.service.js.map +1 -0
  844. package/dist/module/workflow/service/populate-workflow.service.d.ts +21 -0
  845. package/dist/module/workflow/service/populate-workflow.service.js +181 -0
  846. package/dist/module/workflow/service/populate-workflow.service.js.map +1 -0
  847. package/dist/module/workflow/service/stage-action-mapping.service.d.ts +3 -0
  848. package/dist/module/workflow/service/stage-action-mapping.service.js +18 -0
  849. package/dist/module/workflow/service/stage-action-mapping.service.js.map +1 -0
  850. package/dist/module/workflow/service/stage-group.service.d.ts +29 -0
  851. package/dist/module/workflow/service/stage-group.service.js +213 -0
  852. package/dist/module/workflow/service/stage-group.service.js.map +1 -0
  853. package/dist/module/workflow/service/stage.service.d.ts +42 -0
  854. package/dist/module/workflow/service/stage.service.js +102 -0
  855. package/dist/module/workflow/service/stage.service.js.map +1 -0
  856. package/dist/module/workflow/service/task.service.d.ts +48 -0
  857. package/dist/module/workflow/service/task.service.js +324 -0
  858. package/dist/module/workflow/service/task.service.js.map +1 -0
  859. package/dist/module/workflow/service/workflow-list-master.service.d.ts +9 -0
  860. package/dist/module/workflow/service/workflow-list-master.service.js +61 -0
  861. package/dist/module/workflow/service/workflow-list-master.service.js.map +1 -0
  862. package/dist/module/workflow/service/workflow-meta.service.d.ts +26 -0
  863. package/dist/module/workflow/service/workflow-meta.service.js +343 -0
  864. package/dist/module/workflow/service/workflow-meta.service.js.map +1 -0
  865. package/dist/module/workflow/service/workflow.service.d.ts +33 -0
  866. package/dist/module/workflow/service/workflow.service.js +140 -0
  867. package/dist/module/workflow/service/workflow.service.js.map +1 -0
  868. package/dist/module/workflow/workflow.module.d.ts +2 -0
  869. package/dist/module/workflow/workflow.module.js +188 -0
  870. package/dist/module/workflow/workflow.module.js.map +1 -0
  871. package/dist/module/workflow-automation/controller/workflow-automation.controller.d.ts +5 -0
  872. package/dist/module/workflow-automation/controller/workflow-automation.controller.js +31 -0
  873. package/dist/module/workflow-automation/controller/workflow-automation.controller.js.map +1 -0
  874. package/dist/module/workflow-automation/entity/workflow-automation-action.entity.d.ts +10 -0
  875. package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js +51 -0
  876. package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js.map +1 -0
  877. package/dist/module/workflow-automation/entity/workflow-automation.entity.d.ts +11 -0
  878. package/dist/module/workflow-automation/entity/workflow-automation.entity.js +55 -0
  879. package/dist/module/workflow-automation/entity/workflow-automation.entity.js.map +1 -0
  880. package/dist/module/workflow-automation/interface/action.decorator.d.ts +2 -0
  881. package/dist/module/workflow-automation/interface/action.decorator.js +8 -0
  882. package/dist/module/workflow-automation/interface/action.decorator.js.map +1 -0
  883. package/dist/module/workflow-automation/interface/action.interface.d.ts +4 -0
  884. package/dist/module/workflow-automation/interface/action.interface.js +3 -0
  885. package/dist/module/workflow-automation/interface/action.interface.js.map +1 -0
  886. package/dist/module/workflow-automation/service/action-registery.service.d.ts +11 -0
  887. package/dist/module/workflow-automation/service/action-registery.service.js +46 -0
  888. package/dist/module/workflow-automation/service/action-registery.service.js.map +1 -0
  889. package/dist/module/workflow-automation/service/workflow-automation-engine.service.d.ts +12 -0
  890. package/dist/module/workflow-automation/service/workflow-automation-engine.service.js +70 -0
  891. package/dist/module/workflow-automation/service/workflow-automation-engine.service.js.map +1 -0
  892. package/dist/module/workflow-automation/service/workflow-automation.service.d.ts +53 -0
  893. package/dist/module/workflow-automation/service/workflow-automation.service.js +219 -0
  894. package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -0
  895. package/dist/module/workflow-automation/workflow-automation.module.d.ts +2 -0
  896. package/dist/module/workflow-automation/workflow-automation.module.js +47 -0
  897. package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -0
  898. package/dist/resources/properties.module.d.ts +2 -0
  899. package/dist/resources/properties.module.js +25 -0
  900. package/dist/resources/properties.module.js.map +1 -0
  901. package/dist/resources/properties.yaml.d.ts +2 -0
  902. package/dist/resources/properties.yaml.js +10 -0
  903. package/dist/resources/properties.yaml.js.map +1 -0
  904. package/dist/tsconfig.build.tsbuildinfo +1 -0
  905. package/dist/utils/dto/excel-data.dto.d.ts +7 -0
  906. package/dist/utils/dto/excel-data.dto.js +16 -0
  907. package/dist/utils/dto/excel-data.dto.js.map +1 -0
  908. package/dist/utils/dto/excelsheet-data.dto.d.ts +5 -0
  909. package/dist/utils/dto/excelsheet-data.dto.js +3 -0
  910. package/dist/utils/dto/excelsheet-data.dto.js.map +1 -0
  911. package/dist/utils/service/base64util.service.d.ts +4 -0
  912. package/dist/utils/service/base64util.service.js +21 -0
  913. package/dist/utils/service/base64util.service.js.map +1 -0
  914. package/dist/utils/service/clockIDGenUtil.service.d.ts +8 -0
  915. package/dist/utils/service/clockIDGenUtil.service.js +32 -0
  916. package/dist/utils/service/clockIDGenUtil.service.js.map +1 -0
  917. package/dist/utils/service/codeGenerator.service.d.ts +3 -0
  918. package/dist/utils/service/codeGenerator.service.js +19 -0
  919. package/dist/utils/service/codeGenerator.service.js.map +1 -0
  920. package/dist/utils/service/dateUtil.service.d.ts +3 -0
  921. package/dist/utils/service/dateUtil.service.js +28 -0
  922. package/dist/utils/service/dateUtil.service.js.map +1 -0
  923. package/dist/utils/service/encryptUtil.service.d.ts +9 -0
  924. package/dist/utils/service/encryptUtil.service.js +112 -0
  925. package/dist/utils/service/encryptUtil.service.js.map +1 -0
  926. package/dist/utils/service/excel-helper.service.d.ts +9 -0
  927. package/dist/utils/service/excel-helper.service.js +56 -0
  928. package/dist/utils/service/excel-helper.service.js.map +1 -0
  929. package/dist/utils/service/excelUtil.service.d.ts +3 -0
  930. package/dist/utils/service/excelUtil.service.js +17 -0
  931. package/dist/utils/service/excelUtil.service.js.map +1 -0
  932. package/dist/utils/service/file-util.service.d.ts +3 -0
  933. package/dist/utils/service/file-util.service.js +15 -0
  934. package/dist/utils/service/file-util.service.js.map +1 -0
  935. package/dist/utils/service/json-util.service.d.ts +3 -0
  936. package/dist/utils/service/json-util.service.js +24 -0
  937. package/dist/utils/service/json-util.service.js.map +1 -0
  938. package/dist/utils/service/loggingUtil.service.d.ts +4 -0
  939. package/dist/utils/service/loggingUtil.service.js +49 -0
  940. package/dist/utils/service/loggingUtil.service.js.map +1 -0
  941. package/dist/utils/service/reflection-helper.service.d.ts +9 -0
  942. package/dist/utils/service/reflection-helper.service.js +60 -0
  943. package/dist/utils/service/reflection-helper.service.js.map +1 -0
  944. package/dist/utils/service/wbsCodeGen.service.d.ts +3 -0
  945. package/dist/utils/service/wbsCodeGen.service.js +20 -0
  946. package/dist/utils/service/wbsCodeGen.service.js.map +1 -0
  947. package/dist/utils/utils.module.d.ts +2 -0
  948. package/dist/utils/utils.module.js +38 -0
  949. package/dist/utils/utils.module.js.map +1 -0
  950. package/package.json +1 -1
@@ -0,0 +1,295 @@
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 TubelightWhatsAppStrategy_1;
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.TubelightWhatsAppStrategy = void 0;
11
+ const common_1 = require("@nestjs/common");
12
+ const axios_1 = require("axios");
13
+ let TubelightWhatsAppStrategy = TubelightWhatsAppStrategy_1 = class TubelightWhatsAppStrategy {
14
+ constructor() {
15
+ this.logger = new common_1.Logger(TubelightWhatsAppStrategy_1.name);
16
+ this.defaultBaseUrl = 'https://portal.tubelightcommunications.com/whatsapp/api/v1';
17
+ }
18
+ async sendMessage(to, message, config) {
19
+ try {
20
+ if (!this.validateConfig(config)) {
21
+ throw new Error('Invalid Tubelight WhatsApp configuration');
22
+ }
23
+ const tubelightConfig = config;
24
+ const token = await this.authenticate(tubelightConfig);
25
+ if (!token) {
26
+ throw new Error('Failed to authenticate with Tubelight');
27
+ }
28
+ const baseUrl = tubelightConfig.baseUrl || this.defaultBaseUrl;
29
+ const url = `${baseUrl}/messages/send`;
30
+ const payload = this.prepareMessagePayload(to, message, config);
31
+ const response = await axios_1.default.post(url, payload, {
32
+ headers: {
33
+ 'X-TENANT-ID': tubelightConfig.tenantId,
34
+ 'Content-Type': 'application/json',
35
+ Authorization: `Bearer ${token}`,
36
+ },
37
+ timeout: 30000,
38
+ });
39
+ if (response.data?.success &&
40
+ (response.data?.messageId || response.data?.id)) {
41
+ const messageId = response.data.messageId || response.data.id;
42
+ this.logger.log(`Tubelight WhatsApp message sent successfully to ${to}, messageId: ${messageId}`);
43
+ return {
44
+ success: true,
45
+ messageId: messageId,
46
+ provider: 'tubelight',
47
+ service: 'API',
48
+ timestamp: new Date(),
49
+ };
50
+ }
51
+ else {
52
+ throw new Error(response.data?.error ||
53
+ response.data?.message ||
54
+ 'Invalid response from Tubelight API');
55
+ }
56
+ }
57
+ catch (error) {
58
+ this.logger.error(`Failed to send Tubelight WhatsApp message to ${to}`, error.response?.data || error.message);
59
+ return {
60
+ success: false,
61
+ provider: 'tubelight',
62
+ service: 'API',
63
+ error: this.extractErrorMessage(error),
64
+ timestamp: new Date(),
65
+ };
66
+ }
67
+ }
68
+ async authenticate(config) {
69
+ try {
70
+ const baseUrl = config.baseUrl || this.defaultBaseUrl;
71
+ const authUrl = baseUrl.replace('/whatsapp/api/v1', '/auth/api/v1');
72
+ const response = await axios_1.default.post(`${authUrl}/login`, {
73
+ user_name: config.userName,
74
+ password: config.password,
75
+ }, {
76
+ headers: {
77
+ 'Content-Type': 'application/json',
78
+ 'X-TENANT-ID': config.tenantId,
79
+ },
80
+ });
81
+ const data = response.data;
82
+ if (data.success !== false) {
83
+ return data?.bearer_token || data?.access_token || data?.token || null;
84
+ }
85
+ return null;
86
+ }
87
+ catch (error) {
88
+ this.logger.error('Failed to authenticate with Tubelight:', error.response?.data || error.message);
89
+ return null;
90
+ }
91
+ }
92
+ prepareMessagePayload(to, message, config) {
93
+ const basePayload = {
94
+ to: this.formatPhoneNumber(to),
95
+ from: config.sourceNumber || config.from,
96
+ };
97
+ if (config.messageType) {
98
+ switch (config.messageType) {
99
+ case 'template':
100
+ return {
101
+ ...basePayload,
102
+ messageType: 'TEMPLATE',
103
+ templateId: config.templateId,
104
+ templateParams: config.templateParams || [],
105
+ language: config.templateLanguage || 'en',
106
+ };
107
+ case 'image':
108
+ return {
109
+ ...basePayload,
110
+ messageType: 'IMAGE',
111
+ mediaUrl: config.mediaUrl,
112
+ caption: message || config.caption || '',
113
+ };
114
+ case 'document':
115
+ return {
116
+ ...basePayload,
117
+ messageType: 'DOCUMENT',
118
+ mediaUrl: config.mediaUrl,
119
+ filename: config.filename || 'document',
120
+ caption: message || config.caption || '',
121
+ };
122
+ case 'audio':
123
+ return {
124
+ ...basePayload,
125
+ messageType: 'AUDIO',
126
+ mediaUrl: config.mediaUrl,
127
+ };
128
+ case 'video':
129
+ return {
130
+ ...basePayload,
131
+ messageType: 'VIDEO',
132
+ mediaUrl: config.mediaUrl,
133
+ caption: message || config.caption || '',
134
+ };
135
+ case 'location':
136
+ return {
137
+ ...basePayload,
138
+ messageType: 'LOCATION',
139
+ latitude: config.latitude,
140
+ longitude: config.longitude,
141
+ name: config.locationName || '',
142
+ address: config.locationAddress || '',
143
+ };
144
+ case 'interactive':
145
+ return {
146
+ ...basePayload,
147
+ messageType: 'INTERACTIVE',
148
+ interactiveType: config.interactiveType || 'button',
149
+ text: message,
150
+ buttons: config.buttons || [],
151
+ sections: config.sections || [],
152
+ header: config.header,
153
+ footer: config.footer,
154
+ };
155
+ default:
156
+ break;
157
+ }
158
+ }
159
+ return {
160
+ ...basePayload,
161
+ messageType: 'TEXT',
162
+ text: message,
163
+ };
164
+ }
165
+ formatPhoneNumber(phoneNumber) {
166
+ let formatted = phoneNumber.replace(/[^\d+]/g, '');
167
+ if (!formatted.startsWith('+')) {
168
+ formatted = `+${formatted}`;
169
+ }
170
+ return formatted;
171
+ }
172
+ extractErrorMessage(error) {
173
+ if (error.response?.data?.error) {
174
+ return error.response.data.error;
175
+ }
176
+ if (error.response?.data?.message) {
177
+ return error.response.data.message;
178
+ }
179
+ if (error.response?.data?.details) {
180
+ return error.response.data.details;
181
+ }
182
+ if (error.message) {
183
+ return error.message;
184
+ }
185
+ return 'Unknown Tubelight API error';
186
+ }
187
+ validateConfig(config) {
188
+ if (!config || typeof config !== 'object') {
189
+ return false;
190
+ }
191
+ if (!config.userName || !config.password || !config.tenantId) {
192
+ return false;
193
+ }
194
+ if (config.messageType) {
195
+ switch (config.messageType) {
196
+ case 'template':
197
+ if (!config.templateId) {
198
+ return false;
199
+ }
200
+ break;
201
+ case 'image':
202
+ case 'document':
203
+ case 'audio':
204
+ case 'video':
205
+ if (!config.mediaUrl) {
206
+ return false;
207
+ }
208
+ break;
209
+ case 'location':
210
+ if (typeof config.latitude !== 'number' ||
211
+ typeof config.longitude !== 'number') {
212
+ return false;
213
+ }
214
+ break;
215
+ case 'interactive':
216
+ if (!config.buttons &&
217
+ !config.sections &&
218
+ (!config.interactiveType ||
219
+ !['button', 'list'].includes(config.interactiveType))) {
220
+ return false;
221
+ }
222
+ break;
223
+ }
224
+ }
225
+ return true;
226
+ }
227
+ async getAccountInfo(config) {
228
+ try {
229
+ const token = await this.authenticate(config);
230
+ if (!token) {
231
+ throw new Error('Authentication failed');
232
+ }
233
+ const baseUrl = config.baseUrl || this.defaultBaseUrl;
234
+ const url = `${baseUrl}/account/info`;
235
+ const response = await axios_1.default.get(url, {
236
+ headers: {
237
+ 'X-TENANT-ID': config.tenantId,
238
+ Authorization: `Bearer ${token}`,
239
+ },
240
+ });
241
+ return response.data;
242
+ }
243
+ catch (error) {
244
+ this.logger.error('Failed to get Tubelight account info', error.response?.data || error.message);
245
+ throw new Error(`Failed to get account info: ${this.extractErrorMessage(error)}`);
246
+ }
247
+ }
248
+ async getTemplates(config) {
249
+ try {
250
+ const token = await this.authenticate(config);
251
+ if (!token) {
252
+ throw new Error('Authentication failed');
253
+ }
254
+ const baseUrl = config.baseUrl || this.defaultBaseUrl;
255
+ const url = `${baseUrl}/templates`;
256
+ const response = await axios_1.default.get(url, {
257
+ headers: {
258
+ 'X-TENANT-ID': config.tenantId,
259
+ Authorization: `Bearer ${token}`,
260
+ },
261
+ });
262
+ return response.data;
263
+ }
264
+ catch (error) {
265
+ this.logger.error('Failed to get Tubelight templates', error.response?.data || error.message);
266
+ throw new Error(`Failed to get templates: ${this.extractErrorMessage(error)}`);
267
+ }
268
+ }
269
+ async getMessageStatus(config, messageId) {
270
+ try {
271
+ const token = await this.authenticate(config);
272
+ if (!token) {
273
+ throw new Error('Authentication failed');
274
+ }
275
+ const baseUrl = config.baseUrl || this.defaultBaseUrl;
276
+ const url = `${baseUrl}/messages/${messageId}/status`;
277
+ const response = await axios_1.default.get(url, {
278
+ headers: {
279
+ 'X-TENANT-ID': config.tenantId,
280
+ Authorization: `Bearer ${token}`,
281
+ },
282
+ });
283
+ return response.data;
284
+ }
285
+ catch (error) {
286
+ this.logger.error('Failed to get message status', error.response?.data || error.message);
287
+ throw new Error(`Failed to get message status: ${this.extractErrorMessage(error)}`);
288
+ }
289
+ }
290
+ };
291
+ exports.TubelightWhatsAppStrategy = TubelightWhatsAppStrategy;
292
+ exports.TubelightWhatsAppStrategy = TubelightWhatsAppStrategy = TubelightWhatsAppStrategy_1 = __decorate([
293
+ (0, common_1.Injectable)()
294
+ ], TubelightWhatsAppStrategy);
295
+ //# sourceMappingURL=tubelight-whatsapp.strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tubelight-whatsapp.strategy.js","sourceRoot":"","sources":["../../../../../src/module/integration/strategies/whatsapp/tubelight-whatsapp.strategy.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,iCAA6C;AAoCtC,IAAM,yBAAyB,iCAA/B,MAAM,yBAAyB;IAA/B;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,2BAAyB,CAAC,IAAI,CAAC,CAAC;QACpD,mBAAc,GAC7B,4DAA4D,CAAC;IA0XjE,CAAC;IAxXC,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,0CAA0C,CAAC,CAAC;YAC9D,CAAC;YAED,MAAM,eAAe,GAAG,MAAiC,CAAC;YAC1D,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;YAEvD,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;YAC3D,CAAC;YAED,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC;YAC/D,MAAM,GAAG,GAAG,GAAG,OAAO,gBAAgB,CAAC;YAEvC,MAAM,OAAO,GAAG,IAAI,CAAC,qBAAqB,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAEhE,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AK,CACf,8BAA8B,EAC9B,KAAK,CAAC,QAAQ,EAAE,IAAI,IAAI,KAAK,CAAC,OAAO,CACtC,CAAC;YACF,MAAM,IAAI,KAAK,CACb,iCAAiC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CACnE,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AA7XY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;GACA,yBAAyB,CA6XrC"}
@@ -0,0 +1,20 @@
1
+ import { IntegrationStrategy, IntegrationResult } from '../integration.strategy';
2
+ interface WhatsAppConfig {
3
+ accessToken: string;
4
+ phoneNumberId: string;
5
+ apiVersion?: string;
6
+ businessAccountId?: string;
7
+ }
8
+ export declare class WhatsAppCloudStrategy implements IntegrationStrategy {
9
+ private readonly logger;
10
+ private readonly baseUrl;
11
+ sendMessage(to: string, message: string, config: any): Promise<IntegrationResult>;
12
+ private prepareMessagePayload;
13
+ private formatPhoneNumber;
14
+ private extractErrorMessage;
15
+ validateConfig(config: any): boolean;
16
+ getPhoneNumberInfo(config: WhatsAppConfig): Promise<any>;
17
+ getBusinessProfile(config: WhatsAppConfig): Promise<any>;
18
+ updateBusinessProfile(config: WhatsAppConfig, profileData: any): Promise<any>;
19
+ }
20
+ export {};
@@ -0,0 +1,264 @@
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 WhatsAppCloudStrategy_1;
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.WhatsAppCloudStrategy = void 0;
11
+ const common_1 = require("@nestjs/common");
12
+ const axios_1 = require("axios");
13
+ let WhatsAppCloudStrategy = WhatsAppCloudStrategy_1 = class WhatsAppCloudStrategy {
14
+ constructor() {
15
+ this.logger = new common_1.Logger(WhatsAppCloudStrategy_1.name);
16
+ this.baseUrl = 'https://graph.facebook.com';
17
+ }
18
+ async sendMessage(to, message, config) {
19
+ try {
20
+ if (!this.validateConfig(config)) {
21
+ throw new Error('Invalid WhatsApp Cloud API configuration');
22
+ }
23
+ const whatsappConfig = config;
24
+ const apiVersion = whatsappConfig.apiVersion || 'v18.0';
25
+ const url = `${this.baseUrl}/${apiVersion}/${whatsappConfig.phoneNumberId}/messages`;
26
+ const payload = this.prepareMessagePayload(to, message, config);
27
+ const response = await axios_1.default.post(url, payload, {
28
+ headers: {
29
+ Authorization: `Bearer ${whatsappConfig.accessToken}`,
30
+ 'Content-Type': 'application/json',
31
+ },
32
+ timeout: 30000,
33
+ });
34
+ if (response.data?.messages?.[0]?.id) {
35
+ this.logger.log(`WhatsApp message sent successfully to ${to}, messageId: ${response.data.messages[0].id}`);
36
+ return {
37
+ success: true,
38
+ messageId: response.data.messages[0].id,
39
+ provider: 'whatsapp-cloud',
40
+ service: 'API',
41
+ timestamp: new Date(),
42
+ };
43
+ }
44
+ else {
45
+ throw new Error('Invalid response from WhatsApp API');
46
+ }
47
+ }
48
+ catch (error) {
49
+ this.logger.error(`Failed to send WhatsApp message to ${to}`, error.response?.data || error.message);
50
+ return {
51
+ success: false,
52
+ provider: 'whatsapp-cloud',
53
+ service: 'API',
54
+ error: this.extractErrorMessage(error),
55
+ timestamp: new Date(),
56
+ };
57
+ }
58
+ }
59
+ prepareMessagePayload(to, message, config) {
60
+ const basePayload = {
61
+ messaging_product: 'whatsapp',
62
+ to: this.formatPhoneNumber(to),
63
+ type: 'text',
64
+ };
65
+ if (config.messageType) {
66
+ switch (config.messageType) {
67
+ case 'template':
68
+ return {
69
+ ...basePayload,
70
+ type: 'template',
71
+ template: {
72
+ name: config.templateName || 'hello_world',
73
+ language: {
74
+ code: config.languageCode || 'en_US',
75
+ },
76
+ components: config.templateComponents || [],
77
+ },
78
+ };
79
+ case 'image':
80
+ return {
81
+ ...basePayload,
82
+ type: 'image',
83
+ image: {
84
+ link: config.mediaUrl,
85
+ caption: message || config.caption,
86
+ },
87
+ };
88
+ case 'document':
89
+ return {
90
+ ...basePayload,
91
+ type: 'document',
92
+ document: {
93
+ link: config.mediaUrl,
94
+ caption: message || config.caption,
95
+ filename: config.filename,
96
+ },
97
+ };
98
+ case 'audio':
99
+ return {
100
+ ...basePayload,
101
+ type: 'audio',
102
+ audio: {
103
+ link: config.mediaUrl,
104
+ },
105
+ };
106
+ case 'video':
107
+ return {
108
+ ...basePayload,
109
+ type: 'video',
110
+ video: {
111
+ link: config.mediaUrl,
112
+ caption: message || config.caption,
113
+ },
114
+ };
115
+ case 'location':
116
+ return {
117
+ ...basePayload,
118
+ type: 'location',
119
+ location: {
120
+ latitude: config.latitude,
121
+ longitude: config.longitude,
122
+ name: config.locationName,
123
+ address: config.locationAddress,
124
+ },
125
+ };
126
+ case 'interactive':
127
+ return {
128
+ ...basePayload,
129
+ type: 'interactive',
130
+ interactive: {
131
+ type: config.interactiveType || 'button',
132
+ body: {
133
+ text: message,
134
+ },
135
+ footer: config.footer ? { text: config.footer } : undefined,
136
+ action: config.interactiveAction,
137
+ },
138
+ };
139
+ default:
140
+ break;
141
+ }
142
+ }
143
+ return {
144
+ ...basePayload,
145
+ text: {
146
+ body: message,
147
+ preview_url: config.previewUrl !== false,
148
+ },
149
+ };
150
+ }
151
+ formatPhoneNumber(phoneNumber) {
152
+ let formatted = phoneNumber.replace(/[^\d+]/g, '');
153
+ if (!formatted.startsWith('+')) {
154
+ formatted = `+${formatted}`;
155
+ }
156
+ return formatted.substring(1);
157
+ }
158
+ extractErrorMessage(error) {
159
+ if (error.response?.data?.error?.message) {
160
+ return error.response.data.error.message;
161
+ }
162
+ if (error.response?.data?.error?.error_user_msg) {
163
+ return error.response.data.error.error_user_msg;
164
+ }
165
+ if (error.response?.data?.message) {
166
+ return error.response.data.message;
167
+ }
168
+ if (error.message) {
169
+ return error.message;
170
+ }
171
+ return 'Unknown WhatsApp API error';
172
+ }
173
+ validateConfig(config) {
174
+ if (!config || typeof config !== 'object') {
175
+ return false;
176
+ }
177
+ if (!config.accessToken || !config.phoneNumberId) {
178
+ return false;
179
+ }
180
+ if (config.messageType) {
181
+ switch (config.messageType) {
182
+ case 'template':
183
+ if (!config.templateName) {
184
+ return false;
185
+ }
186
+ break;
187
+ case 'image':
188
+ case 'document':
189
+ case 'audio':
190
+ case 'video':
191
+ if (!config.mediaUrl) {
192
+ return false;
193
+ }
194
+ break;
195
+ case 'location':
196
+ if (typeof config.latitude !== 'number' ||
197
+ typeof config.longitude !== 'number') {
198
+ return false;
199
+ }
200
+ break;
201
+ case 'interactive':
202
+ if (!config.interactiveAction) {
203
+ return false;
204
+ }
205
+ break;
206
+ }
207
+ }
208
+ return true;
209
+ }
210
+ async getPhoneNumberInfo(config) {
211
+ try {
212
+ const apiVersion = config.apiVersion || 'v18.0';
213
+ const url = `${this.baseUrl}/${apiVersion}/${config.phoneNumberId}`;
214
+ const response = await axios_1.default.get(url, {
215
+ headers: {
216
+ Authorization: `Bearer ${config.accessToken}`,
217
+ },
218
+ });
219
+ return response.data;
220
+ }
221
+ catch (error) {
222
+ this.logger.error('Failed to get phone number info', error.response?.data || error.message);
223
+ throw new Error(`Failed to get phone number info: ${this.extractErrorMessage(error)}`);
224
+ }
225
+ }
226
+ async getBusinessProfile(config) {
227
+ try {
228
+ const apiVersion = config.apiVersion || 'v18.0';
229
+ const url = `${this.baseUrl}/${apiVersion}/${config.phoneNumberId}/whatsapp_business_profile`;
230
+ const response = await axios_1.default.get(url, {
231
+ headers: {
232
+ Authorization: `Bearer ${config.accessToken}`,
233
+ },
234
+ });
235
+ return response.data;
236
+ }
237
+ catch (error) {
238
+ this.logger.error('Failed to get business profile', error.response?.data || error.message);
239
+ throw new Error(`Failed to get business profile: ${this.extractErrorMessage(error)}`);
240
+ }
241
+ }
242
+ async updateBusinessProfile(config, profileData) {
243
+ try {
244
+ const apiVersion = config.apiVersion || 'v18.0';
245
+ const url = `${this.baseUrl}/${apiVersion}/${config.phoneNumberId}/whatsapp_business_profile`;
246
+ const response = await axios_1.default.post(url, profileData, {
247
+ headers: {
248
+ Authorization: `Bearer ${config.accessToken}`,
249
+ 'Content-Type': 'application/json',
250
+ },
251
+ });
252
+ return response.data;
253
+ }
254
+ catch (error) {
255
+ this.logger.error('Failed to update business profile', error.response?.data || error.message);
256
+ throw new Error(`Failed to update business profile: ${this.extractErrorMessage(error)}`);
257
+ }
258
+ }
259
+ };
260
+ exports.WhatsAppCloudStrategy = WhatsAppCloudStrategy;
261
+ exports.WhatsAppCloudStrategy = WhatsAppCloudStrategy = WhatsAppCloudStrategy_1 = __decorate([
262
+ (0, common_1.Injectable)()
263
+ ], WhatsAppCloudStrategy);
264
+ //# sourceMappingURL=whatsapp-cloud.strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"whatsapp-cloud.strategy.js","sourceRoot":"","sources":["../../../../../src/module/integration/strategies/whatsapp/whatsapp-cloud.strategy.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAoD;AACpD,iCAA6C;AA2EtC,IAAM,qBAAqB,6BAA3B,MAAM,qBAAqB;IAA3B;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,uBAAqB,CAAC,IAAI,CAAC,CAAC;QAChD,YAAO,GAAG,4BAA4B,CAAC;IAoU1D,CAAC;IAlUC,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,0CAA0C,CAAC,CAAC;YAC9D,CAAC;YAED,MAAM,cAAc,GAAG,MAAwB,CAAC;YAChD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C;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,mCAAmC,EACnC,KAAK,CAAC,QAAQ,EAAE,IAAI,IAAI,KAAK,CAAC,OAAO,CACtC,CAAC;YACF,MAAM,IAAI,KAAK,CACb,sCAAsC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CACxE,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAtUY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;GACA,qBAAqB,CAsUjC"}
@@ -0,0 +1,5 @@
1
+ import { IntegrationStrategy, IntegrationResult } from '../integration.strategy';
2
+ export declare class WhatsAppStrategy implements IntegrationStrategy {
3
+ sendMessage(to: string, message: string, config: any): Promise<IntegrationResult>;
4
+ validateConfig(config: any): boolean;
5
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.WhatsAppStrategy = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const axios_1 = require("axios");
12
+ let WhatsAppStrategy = class WhatsAppStrategy {
13
+ async sendMessage(to, message, config) {
14
+ try {
15
+ const { accessToken, phoneNumberId, apiVersion = 'v17.0' } = config;
16
+ const url = `https://graph.facebook.com/${apiVersion}/${phoneNumberId}/messages`;
17
+ const payload = {
18
+ messaging_product: 'whatsapp',
19
+ to: to,
20
+ type: 'text',
21
+ text: {
22
+ body: message,
23
+ },
24
+ };
25
+ const response = await axios_1.default.post(url, payload, {
26
+ headers: {
27
+ Authorization: `Bearer ${accessToken}`,
28
+ 'Content-Type': 'application/json',
29
+ },
30
+ });
31
+ return {
32
+ success: true,
33
+ provider: 'whatsapp',
34
+ service: 'API',
35
+ messageId: response.data.messages[0].id,
36
+ timestamp: new Date(),
37
+ };
38
+ }
39
+ catch (error) {
40
+ return {
41
+ success: false,
42
+ provider: 'whatsapp',
43
+ service: 'API',
44
+ error: error.message,
45
+ timestamp: new Date(),
46
+ };
47
+ }
48
+ }
49
+ validateConfig(config) {
50
+ return !!(config.accessToken && config.phoneNumberId);
51
+ }
52
+ };
53
+ exports.WhatsAppStrategy = WhatsAppStrategy;
54
+ exports.WhatsAppStrategy = WhatsAppStrategy = __decorate([
55
+ (0, common_1.Injectable)()
56
+ ], WhatsAppStrategy);
57
+ //# sourceMappingURL=whatsapp.strategy.js.map