hgs-twilio-class-lib 1.1.50 → 1.1.51

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 (484) hide show
  1. package/lib/aws/abstract/ServiceObjectStore.js +2 -10
  2. package/lib/aws/abstract/ServiceObjectStore.js.map +1 -0
  3. package/lib/aws/abstract/ServiceOpenRequest.js +2 -10
  4. package/lib/aws/abstract/ServiceOpenRequest.js.map +1 -0
  5. package/lib/aws/abstract/ServiceRequest.js +2 -7
  6. package/lib/aws/abstract/ServiceRequest.js.map +1 -0
  7. package/lib/aws/abstract/ServiceResource.js +2 -31
  8. package/lib/aws/abstract/ServiceResource.js.map +1 -0
  9. package/lib/aws/abstract/ServiceResourceFactory.js +2 -14
  10. package/lib/aws/abstract/ServiceResourceFactory.js.map +1 -0
  11. package/lib/aws/abstract/ServiceTransaction.js +2 -11
  12. package/lib/aws/abstract/ServiceTransaction.js.map +1 -0
  13. package/lib/aws/impl/AWSAPIConfig.js +2 -38
  14. package/lib/aws/impl/AWSAPIConfig.js.map +1 -0
  15. package/lib/aws/impl/AWSClient.js +2 -35
  16. package/lib/aws/impl/AWSClient.js.map +1 -0
  17. package/lib/aws/impl/AWSConnectAPIConfig.js +2 -38
  18. package/lib/aws/impl/AWSConnectAPIConfig.js.map +1 -0
  19. package/lib/aws/impl/DynamoDB/DynamoOpenRequest.js +2 -24
  20. package/lib/aws/impl/DynamoDB/DynamoOpenRequest.js.map +1 -0
  21. package/lib/aws/impl/DynamoDB/DynamoRequest.js +2 -21
  22. package/lib/aws/impl/DynamoDB/DynamoRequest.js.map +1 -0
  23. package/lib/aws/impl/DynamoDB/DynamoResourse.js +2 -45
  24. package/lib/aws/impl/DynamoDB/DynamoResourse.js.map +1 -0
  25. package/lib/aws/impl/DynamoDB/DynamoServiceFactory.js +2 -63
  26. package/lib/aws/impl/DynamoDB/DynamoServiceFactory.js.map +1 -0
  27. package/lib/aws/impl/DynamoDB/DynamoTable.js +2 -126
  28. package/lib/aws/impl/DynamoDB/DynamoTable.js.map +1 -0
  29. package/lib/aws/impl/DynamoDB/DynamoTransaction.js +2 -37
  30. package/lib/aws/impl/DynamoDB/DynamoTransaction.js.map +1 -0
  31. package/lib/aws/impl/HoopServices/HoopService.js +2 -124
  32. package/lib/aws/impl/HoopServices/HoopService.js.map +1 -0
  33. package/lib/aws/impl/HoopServices/HoopServiceFactory.js +2 -53
  34. package/lib/aws/impl/HoopServices/HoopServiceFactory.js.map +1 -0
  35. package/lib/aws/impl/HoopServices/HoopServiceOpenRequest.js +2 -24
  36. package/lib/aws/impl/HoopServices/HoopServiceOpenRequest.js.map +1 -0
  37. package/lib/aws/impl/HoopServices/HoopServiceResource.js +2 -46
  38. package/lib/aws/impl/HoopServices/HoopServiceResource.js.map +1 -0
  39. package/lib/aws/impl/HoopServices/HoopServiceTransaction.js +2 -37
  40. package/lib/aws/impl/HoopServices/HoopServiceTransaction.js.map +1 -0
  41. package/lib/aws/interface/IDirection.js +2 -2
  42. package/lib/aws/interface/IDirection.js.map +1 -0
  43. package/lib/aws/interface/ILink.js +2 -2
  44. package/lib/aws/interface/ILink.js.map +1 -0
  45. package/lib/aws/interface/IServiceDBOpenRequest.js +2 -2
  46. package/lib/aws/interface/IServiceDBOpenRequest.js.map +1 -0
  47. package/lib/aws/interface/IServiceObjectStore.js +2 -2
  48. package/lib/aws/interface/IServiceObjectStore.js.map +1 -0
  49. package/lib/aws/interface/IServiceObjectStoreParameters.js +2 -2
  50. package/lib/aws/interface/IServiceObjectStoreParameters.js.map +1 -0
  51. package/lib/aws/interface/IServiceRequest.js +2 -2
  52. package/lib/aws/interface/IServiceRequest.js.map +1 -0
  53. package/lib/aws/interface/IServiceResource.js +2 -2
  54. package/lib/aws/interface/IServiceResource.js.map +1 -0
  55. package/lib/aws/interface/IServiceTransation.js +2 -2
  56. package/lib/aws/interface/IServiceTransation.js.map +1 -0
  57. package/lib/aws/interface/ISubResourceUri.js +2 -2
  58. package/lib/aws/interface/ISubResourceUri.js.map +1 -0
  59. package/lib/aws/interface/ISyncItemData.js +2 -1
  60. package/lib/aws/interface/ISyncItemData.js.map +1 -0
  61. package/lib/aws/interface/ISyncObjectStoreParameters.js +2 -1
  62. package/lib/aws/interface/ISyncObjectStoreParameters.js.map +1 -0
  63. package/lib/aws/interface/ISyncTransactionOptions.js +2 -2
  64. package/lib/aws/interface/ISyncTransactionOptions.js.map +1 -0
  65. package/lib/common/abstract/CommonError.js +2 -12
  66. package/lib/common/abstract/CommonError.js.map +1 -0
  67. package/lib/common/abstract/Database.js +2 -58
  68. package/lib/common/abstract/Database.js.map +1 -0
  69. package/lib/common/abstract/DatabaseClient.js +2 -21
  70. package/lib/common/abstract/DatabaseClient.js.map +1 -0
  71. package/lib/common/abstract/DatabaseClientConfig.js +2 -9
  72. package/lib/common/abstract/DatabaseClientConfig.js.map +1 -0
  73. package/lib/common/abstract/DatabaseFactory.js +2 -32
  74. package/lib/common/abstract/DatabaseFactory.js.map +1 -0
  75. package/lib/common/abstract/DatabaseObjectStore.js +2 -13
  76. package/lib/common/abstract/DatabaseObjectStore.js.map +1 -0
  77. package/lib/common/abstract/DatabaseOpenRequest.js +2 -13
  78. package/lib/common/abstract/DatabaseOpenRequest.js.map +1 -0
  79. package/lib/common/abstract/DatabaseRequest.js +2 -14
  80. package/lib/common/abstract/DatabaseRequest.js.map +1 -0
  81. package/lib/common/abstract/DatabaseTransaction.js +2 -13
  82. package/lib/common/abstract/DatabaseTransaction.js.map +1 -0
  83. package/lib/common/abstract/Filter.js +2 -30
  84. package/lib/common/abstract/Filter.js.map +1 -0
  85. package/lib/common/enum/ErrorTypes.js +2 -9
  86. package/lib/common/enum/ErrorTypes.js.map +1 -0
  87. package/lib/common/enum/FilterTypes.js +2 -14
  88. package/lib/common/enum/FilterTypes.js.map +1 -0
  89. package/lib/common/interface/IDatabaesInfo.js +2 -2
  90. package/lib/common/interface/IDatabaesInfo.js.map +1 -0
  91. package/lib/common/interface/IDatabase.js +2 -2
  92. package/lib/common/interface/IDatabase.js.map +1 -0
  93. package/lib/common/interface/IDatabaseClient.js +2 -2
  94. package/lib/common/interface/IDatabaseClient.js.map +1 -0
  95. package/lib/common/interface/IDatabaseConfig.js +2 -10
  96. package/lib/common/interface/IDatabaseConfig.js.map +1 -0
  97. package/lib/common/interface/IDatabaseDBOpenRequest.js +2 -2
  98. package/lib/common/interface/IDatabaseDBOpenRequest.js.map +1 -0
  99. package/lib/common/interface/IDatabaseFactory.js +2 -2
  100. package/lib/common/interface/IDatabaseFactory.js.map +1 -0
  101. package/lib/common/interface/IDatabaseObjectStore.js +2 -2
  102. package/lib/common/interface/IDatabaseObjectStore.js.map +1 -0
  103. package/lib/common/interface/IDatabaseObjectStoreParameters.js +2 -2
  104. package/lib/common/interface/IDatabaseObjectStoreParameters.js.map +1 -0
  105. package/lib/common/interface/IDatabaseRecord.js +2 -2
  106. package/lib/common/interface/IDatabaseRecord.js.map +1 -0
  107. package/lib/common/interface/IDatabaseRequest.js +2 -2
  108. package/lib/common/interface/IDatabaseRequest.js.map +1 -0
  109. package/lib/common/interface/IDatabaseTransaction.js +2 -2
  110. package/lib/common/interface/IDatabaseTransaction.js.map +1 -0
  111. package/lib/common/interface/IDatabaseTransactionOptions.js +2 -2
  112. package/lib/common/interface/IDatabaseTransactionOptions.js.map +1 -0
  113. package/lib/common/interface/IError.js +2 -2
  114. package/lib/common/interface/IError.js.map +1 -0
  115. package/lib/common/interface/IErrorDetails.js +2 -2
  116. package/lib/common/interface/IErrorDetails.js.map +1 -0
  117. package/lib/common/interface/IFilter.js +2 -2
  118. package/lib/common/interface/IFilter.js.map +1 -0
  119. package/lib/common/type/DatabaseReadyType.js +2 -2
  120. package/lib/common/type/DatabaseReadyType.js.map +1 -0
  121. package/lib/common/type/FilterInputType.js +2 -2
  122. package/lib/common/type/FilterInputType.js.map +1 -0
  123. package/lib/common/type/SearchParameterType.js +2 -3
  124. package/lib/common/type/SearchParameterType.js.map +1 -0
  125. package/lib/common/utils/dateFormat.js +2 -58
  126. package/lib/common/utils/dateFormat.js.map +1 -0
  127. package/lib/common/utils/filter.js +2 -99
  128. package/lib/common/utils/filter.js.map +1 -0
  129. package/lib/common/utils/newFilter.js +2 -126
  130. package/lib/common/utils/newFilter.js.map +1 -0
  131. package/lib/common/utils/pagination.js +2 -9
  132. package/lib/common/utils/pagination.js.map +1 -0
  133. package/lib/common/utils/search.js +2 -14
  134. package/lib/common/utils/search.js.map +1 -0
  135. package/lib/common/utils/sort.js +2 -13
  136. package/lib/common/utils/sort.js.map +1 -0
  137. package/lib/config/AWSConfig.js +2 -9
  138. package/lib/config/AWSConfig.js.map +1 -0
  139. package/lib/config/DatabaseConfig.js +2 -36
  140. package/lib/config/DatabaseConfig.js.map +1 -0
  141. package/lib/config/TwilioConfig.js +2 -7
  142. package/lib/config/TwilioConfig.js.map +1 -0
  143. package/lib/controller/Common.d.ts +0 -1
  144. package/lib/controller/Common.d.ts.map +1 -1
  145. package/lib/controller/Common.js +2 -76
  146. package/lib/controller/Common.js.map +1 -0
  147. package/lib/controller/DatabaseFactoryCollection.js +2 -14
  148. package/lib/controller/DatabaseFactoryCollection.js.map +1 -0
  149. package/lib/controller/MainController.js +2 -174
  150. package/lib/controller/MainController.js.map +1 -0
  151. package/lib/controller/aws/HoopBuisnessHours.js +2 -408
  152. package/lib/controller/aws/HoopBuisnessHours.js.map +1 -0
  153. package/lib/controller/aws/HoopOperationsController.js +2 -86
  154. package/lib/controller/aws/HoopOperationsController.js.map +1 -0
  155. package/lib/controller/aws/HoopOverrideBranchesController.js +2 -40
  156. package/lib/controller/aws/HoopOverrideBranchesController.js.map +1 -0
  157. package/lib/controller/aws/HoopProfilesListController.js +2 -61
  158. package/lib/controller/aws/HoopProfilesListController.js.map +1 -0
  159. package/lib/controller/aws/PlaybackScreenrecordings.js +2 -63
  160. package/lib/controller/aws/PlaybackScreenrecordings.js.map +1 -0
  161. package/lib/controller/twilio/AgentActionsController.js +2 -177
  162. package/lib/controller/twilio/AgentActionsController.js.map +1 -0
  163. package/lib/controller/twilio/AgentScorecardController.js +2 -173
  164. package/lib/controller/twilio/AgentScorecardController.js.map +1 -0
  165. package/lib/controller/twilio/AuditLogController.js +2 -137
  166. package/lib/controller/twilio/AuditLogController.js.map +1 -0
  167. package/lib/controller/twilio/CallLogsController.js +2 -131
  168. package/lib/controller/twilio/CallLogsController.js.map +1 -0
  169. package/lib/controller/twilio/CallbackAndVoicemailController.js +2 -114
  170. package/lib/controller/twilio/CallbackAndVoicemailController.js.map +1 -0
  171. package/lib/controller/twilio/ChannelSettingTaskInfoController.js +2 -117
  172. package/lib/controller/twilio/ChannelSettingTaskInfoController.js.map +1 -0
  173. package/lib/controller/twilio/ChannelSettingsController.js +2 -142
  174. package/lib/controller/twilio/ChannelSettingsController.js.map +1 -0
  175. package/lib/controller/twilio/CxConfigAssetController.d.ts.map +1 -1
  176. package/lib/controller/twilio/CxConfigAssetController.js +2 -128
  177. package/lib/controller/twilio/CxConfigAssetController.js.map +1 -0
  178. package/lib/controller/twilio/CxConfigController.js +2 -112
  179. package/lib/controller/twilio/CxConfigController.js.map +1 -0
  180. package/lib/controller/twilio/CxConfigExternalNumbersController.js +2 -138
  181. package/lib/controller/twilio/CxConfigExternalNumbersController.js.map +1 -0
  182. package/lib/controller/twilio/CxConfigOther.js +2 -128
  183. package/lib/controller/twilio/CxConfigOther.js.map +1 -0
  184. package/lib/controller/twilio/CxConfigQueueMenuController.js +2 -129
  185. package/lib/controller/twilio/CxConfigQueueMenuController.js.map +1 -0
  186. package/lib/controller/twilio/CxConfigUIconfigController.js +2 -132
  187. package/lib/controller/twilio/CxConfigUIconfigController.js.map +1 -0
  188. package/lib/controller/twilio/GPMController.js +2 -151
  189. package/lib/controller/twilio/GPMController.js.map +1 -0
  190. package/lib/controller/twilio/HoopBusinessHoursController.js +2 -285
  191. package/lib/controller/twilio/HoopBusinessHoursController.js.map +1 -0
  192. package/lib/controller/twilio/HoopHolidaysController.js +2 -150
  193. package/lib/controller/twilio/HoopHolidaysController.js.map +1 -0
  194. package/lib/controller/twilio/HoopMainController.js +2 -297
  195. package/lib/controller/twilio/HoopMainController.js.map +1 -0
  196. package/lib/controller/twilio/HoopNotesController.js +2 -149
  197. package/lib/controller/twilio/HoopNotesController.js.map +1 -0
  198. package/lib/controller/twilio/HoopOperationsController.js +2 -138
  199. package/lib/controller/twilio/HoopOperationsController.js.map +1 -0
  200. package/lib/controller/twilio/HoopOverrideBranchesController.js +2 -137
  201. package/lib/controller/twilio/HoopOverrideBranchesController.js.map +1 -0
  202. package/lib/controller/twilio/HoopPartialDaysController.js +2 -150
  203. package/lib/controller/twilio/HoopPartialDaysController.js.map +1 -0
  204. package/lib/controller/twilio/HoopProfilesListController.js +2 -147
  205. package/lib/controller/twilio/HoopProfilesListController.js.map +1 -0
  206. package/lib/controller/twilio/NavigationController.js +2 -170
  207. package/lib/controller/twilio/NavigationController.js.map +1 -0
  208. package/lib/controller/twilio/QualityFormsController.js +2 -129
  209. package/lib/controller/twilio/QualityFormsController.js.map +1 -0
  210. package/lib/controller/twilio/QuickLinkController.js +2 -122
  211. package/lib/controller/twilio/QuickLinkController.js.map +1 -0
  212. package/lib/controller/twilio/RealTimeReportQueueDetailsController.js +2 -126
  213. package/lib/controller/twilio/RealTimeReportQueueDetailsController.js.map +1 -0
  214. package/lib/controller/twilio/RealTimeReportsWGDetailsController.js +2 -160
  215. package/lib/controller/twilio/RealTimeReportsWGDetailsController.js.map +1 -0
  216. package/lib/controller/twilio/TaskInfoPanelController.js +2 -134
  217. package/lib/controller/twilio/TaskInfoPanelController.js.map +1 -0
  218. package/lib/controller/twilio/filterImpl/AgentScorecardFilter.js +2 -52
  219. package/lib/controller/twilio/filterImpl/AgentScorecardFilter.js.map +1 -0
  220. package/lib/controller/twilio/filterImpl/AuditLogsFilter.js +2 -89
  221. package/lib/controller/twilio/filterImpl/AuditLogsFilter.js.map +1 -0
  222. package/lib/controller/twilio/filterImpl/CXConfigPromptFilter.js +2 -81
  223. package/lib/controller/twilio/filterImpl/CXConfigPromptFilter.js.map +1 -0
  224. package/lib/controller/twilio/filterImpl/CallLogsFilter.js +2 -101
  225. package/lib/controller/twilio/filterImpl/CallLogsFilter.js.map +1 -0
  226. package/lib/controller/twilio/filterImpl/CxConfigAssetFilter.js +2 -59
  227. package/lib/controller/twilio/filterImpl/CxConfigAssetFilter.js.map +1 -0
  228. package/lib/controller/twilio/filterImpl/CxConfigExternalNumbersFilter.js +2 -67
  229. package/lib/controller/twilio/filterImpl/CxConfigExternalNumbersFilter.js.map +1 -0
  230. package/lib/controller/twilio/filterImpl/CxConfigOtherFilter.js +2 -52
  231. package/lib/controller/twilio/filterImpl/CxConfigOtherFilter.js.map +1 -0
  232. package/lib/controller/twilio/filterImpl/CxConfigQueueMenuFilter.js +2 -78
  233. package/lib/controller/twilio/filterImpl/CxConfigQueueMenuFilter.js.map +1 -0
  234. package/lib/controller/twilio/filterImpl/CxConfigUIconfigFilter.js +2 -51
  235. package/lib/controller/twilio/filterImpl/CxConfigUIconfigFilter.js.map +1 -0
  236. package/lib/controller/twilio/filterImpl/HoopHolidaysFilter.js +2 -55
  237. package/lib/controller/twilio/filterImpl/HoopHolidaysFilter.js.map +1 -0
  238. package/lib/controller/twilio/filterImpl/HoopNotesFilter.js +2 -51
  239. package/lib/controller/twilio/filterImpl/HoopNotesFilter.js.map +1 -0
  240. package/lib/controller/twilio/filterImpl/HoopPartialDaysFilter.js +2 -55
  241. package/lib/controller/twilio/filterImpl/HoopPartialDaysFilter.js.map +1 -0
  242. package/lib/controller/twilio/filterImpl/MainFilterService.js +2 -108
  243. package/lib/controller/twilio/filterImpl/MainFilterService.js.map +1 -0
  244. package/lib/controller/twilio/filterImpl/NavigationFilter.js +2 -90
  245. package/lib/controller/twilio/filterImpl/NavigationFilter.js.map +1 -0
  246. package/lib/controller/twilio/filterImpl/QueueDetailsFilter.js +2 -53
  247. package/lib/controller/twilio/filterImpl/QueueDetailsFilter.js.map +1 -0
  248. package/lib/controller/twilio/filterImpl/TaskCompleteFilter.js +2 -62
  249. package/lib/controller/twilio/filterImpl/TaskCompleteFilter.js.map +1 -0
  250. package/lib/controller/twilio/filterImpl/TaskInfoPanelFilter.js +2 -52
  251. package/lib/controller/twilio/filterImpl/TaskInfoPanelFilter.js.map +1 -0
  252. package/lib/express/ApiResponse.js +2 -11
  253. package/lib/express/ApiResponse.js.map +1 -0
  254. package/lib/express/RequestValidator.js +2 -77
  255. package/lib/express/RequestValidator.js.map +1 -0
  256. package/lib/express/RequireParamsPicker.js +2 -14
  257. package/lib/express/RequireParamsPicker.js.map +1 -0
  258. package/lib/express/ValidateRequireParameters.js +2 -39
  259. package/lib/express/ValidateRequireParameters.js.map +1 -0
  260. package/lib/index.js +2 -100
  261. package/lib/index.js.map +1 -0
  262. package/lib/models/BatchUpdateSkills.model.js +2 -11
  263. package/lib/models/BatchUpdateSkills.model.js.map +1 -0
  264. package/lib/models/CannedMessage.model.js +2 -1
  265. package/lib/models/CannedMessage.model.js.map +1 -0
  266. package/lib/models/ChannelSettingsTaskInfo.model.js +2 -1
  267. package/lib/models/ChannelSettingsTaskInfo.model.js.map +1 -0
  268. package/lib/models/CustomerFeedback.model.js +2 -1
  269. package/lib/models/CustomerFeedback.model.js.map +1 -0
  270. package/lib/models/Filter.model.js +2 -2
  271. package/lib/models/Filter.model.js.map +1 -0
  272. package/lib/models/Hoop.model.js +2 -9
  273. package/lib/models/Hoop.model.js.map +1 -0
  274. package/lib/models/Navigation.model.js +2 -8
  275. package/lib/models/Navigation.model.js.map +1 -0
  276. package/lib/models/Roles.Model.js +2 -1
  277. package/lib/models/Roles.Model.js.map +1 -0
  278. package/lib/models/abstract/BaseModel.js +2 -40
  279. package/lib/models/abstract/BaseModel.js.map +1 -0
  280. package/lib/models/abstract/BaseModelOld.js +2 -13
  281. package/lib/models/abstract/BaseModelOld.js.map +1 -0
  282. package/lib/models/impl/AgentActionsLogsModel.js +2 -89
  283. package/lib/models/impl/AgentActionsLogsModel.js.map +1 -0
  284. package/lib/models/impl/AgentActionsModel.js +2 -60
  285. package/lib/models/impl/AgentActionsModel.js.map +1 -0
  286. package/lib/models/impl/AgentScorecardModel.js +2 -282
  287. package/lib/models/impl/AgentScorecardModel.js.map +1 -0
  288. package/lib/models/impl/AuditLogsModel.js +2 -146
  289. package/lib/models/impl/AuditLogsModel.js.map +1 -0
  290. package/lib/models/impl/CallLogsModel.js +2 -109
  291. package/lib/models/impl/CallLogsModel.js.map +1 -0
  292. package/lib/models/impl/CallStatisticsModel.js +2 -52
  293. package/lib/models/impl/CallStatisticsModel.js.map +1 -0
  294. package/lib/models/impl/CategoryDetailsModel.js +2 -44
  295. package/lib/models/impl/CategoryDetailsModel.js.map +1 -0
  296. package/lib/models/impl/MemberModel.js +2 -170
  297. package/lib/models/impl/MemberModel.js.map +1 -0
  298. package/lib/models/impl/ModelValidationError.js +2 -15
  299. package/lib/models/impl/ModelValidationError.js.map +1 -0
  300. package/lib/models/impl/NavigationModel.js +2 -126
  301. package/lib/models/impl/NavigationModel.js.map +1 -0
  302. package/lib/models/impl/PerformanceStatisticsModel.js +2 -129
  303. package/lib/models/impl/PerformanceStatisticsModel.js.map +1 -0
  304. package/lib/models/impl/PlaybackScreenrecordings.js +2 -133
  305. package/lib/models/impl/PlaybackScreenrecordings.js.map +1 -0
  306. package/lib/models/impl/ProfileModel.js +2 -102
  307. package/lib/models/impl/ProfileModel.js.map +1 -0
  308. package/lib/models/impl/QualityFormsModel.js +2 -150
  309. package/lib/models/impl/QualityFormsModel.js.map +1 -0
  310. package/lib/models/impl/QuestionDetailsModel.js +2 -173
  311. package/lib/models/impl/QuestionDetailsModel.js.map +1 -0
  312. package/lib/models/impl/QueueDetailsModel.js +2 -261
  313. package/lib/models/impl/QueueDetailsModel.js.map +1 -0
  314. package/lib/models/impl/QueueModel.js +2 -156
  315. package/lib/models/impl/QueueModel.js.map +1 -0
  316. package/lib/models/impl/QuickLinkModel.js +2 -122
  317. package/lib/models/impl/QuickLinkModel.js.map +1 -0
  318. package/lib/models/impl/StatisticsNumberDetailsModel.js +2 -72
  319. package/lib/models/impl/StatisticsNumberDetailsModel.js.map +1 -0
  320. package/lib/models/impl/StatisticsTimeDetailsModel.js +2 -72
  321. package/lib/models/impl/StatisticsTimeDetailsModel.js.map +1 -0
  322. package/lib/models/impl/TaskAttributesModel.js +2 -108
  323. package/lib/models/impl/TaskAttributesModel.js.map +1 -0
  324. package/lib/models/impl/TaskChannelModel.js +2 -69
  325. package/lib/models/impl/TaskChannelModel.js.map +1 -0
  326. package/lib/models/impl/TaskComplete.js +2 -1
  327. package/lib/models/impl/TaskComplete.js.map +1 -0
  328. package/lib/models/impl/TaskInfoPanelModel.js +2 -69
  329. package/lib/models/impl/TaskInfoPanelModel.js.map +1 -0
  330. package/lib/models/impl/TaskModel.js +2 -234
  331. package/lib/models/impl/TaskModel.js.map +1 -0
  332. package/lib/models/impl/WorkGroupDetailsModel.js +2 -281
  333. package/lib/models/impl/WorkGroupDetailsModel.js.map +1 -0
  334. package/lib/models/impl/callbackandvoicemail/CallbackAndVoicemailModel.js +2 -140
  335. package/lib/models/impl/callbackandvoicemail/CallbackAndVoicemailModel.js.map +1 -0
  336. package/lib/models/impl/callbackandvoicemail/CallbackAndVoicemailNamespace.js +2 -12
  337. package/lib/models/impl/callbackandvoicemail/CallbackAndVoicemailNamespace.js.map +1 -0
  338. package/lib/models/impl/callbackandvoicemail/CallbackModel.js +2 -82
  339. package/lib/models/impl/callbackandvoicemail/CallbackModel.js.map +1 -0
  340. package/lib/models/impl/callbackandvoicemail/VoicemailModel.js +2 -108
  341. package/lib/models/impl/callbackandvoicemail/VoicemailModel.js.map +1 -0
  342. package/lib/models/impl/channelsettings/ChannelSettingModel.js +2 -240
  343. package/lib/models/impl/channelsettings/ChannelSettingModel.js.map +1 -0
  344. package/lib/models/impl/channelsettings/ChannelSettingTaskInfoModel.js +2 -106
  345. package/lib/models/impl/channelsettings/ChannelSettingTaskInfoModel.js.map +1 -0
  346. package/lib/models/impl/channelsettings/TaskInfoAttributeModel.js +2 -80
  347. package/lib/models/impl/channelsettings/TaskInfoAttributeModel.js.map +1 -0
  348. package/lib/models/impl/channelsettings/TaskInfoModel.js +2 -52
  349. package/lib/models/impl/channelsettings/TaskInfoModel.js.map +1 -0
  350. package/lib/models/impl/cxconfig/CxConfigNamespace.js +2 -20
  351. package/lib/models/impl/cxconfig/CxConfigNamespace.js.map +1 -0
  352. package/lib/models/impl/cxconfig/CxConfigUIConfigModel.js +2 -103
  353. package/lib/models/impl/cxconfig/CxConfigUIConfigModel.js.map +1 -0
  354. package/lib/models/impl/cxconfig/CxConfiguratorConfigModel.js +2 -103
  355. package/lib/models/impl/cxconfig/CxConfiguratorConfigModel.js.map +1 -0
  356. package/lib/models/impl/cxconfig/CxConfiguratorExternalNumbersModel.js +2 -149
  357. package/lib/models/impl/cxconfig/CxConfiguratorExternalNumbersModel.js.map +1 -0
  358. package/lib/models/impl/cxconfig/CxConfiguratorGPMAssetModel.js +2 -179
  359. package/lib/models/impl/cxconfig/CxConfiguratorGPMAssetModel.js.map +1 -0
  360. package/lib/models/impl/cxconfig/CxConfiguratorGPMPromptModel.js +2 -213
  361. package/lib/models/impl/cxconfig/CxConfiguratorGPMPromptModel.js.map +1 -0
  362. package/lib/models/impl/cxconfig/CxConfiguratorOtherModel.js +2 -96
  363. package/lib/models/impl/cxconfig/CxConfiguratorOtherModel.js.map +1 -0
  364. package/lib/models/impl/cxconfig/CxConfiguratorQueueMenuModel.js +2 -128
  365. package/lib/models/impl/cxconfig/CxConfiguratorQueueMenuModel.js.map +1 -0
  366. package/lib/models/impl/hoop/HoopBusinessHoursModel.js +2 -122
  367. package/lib/models/impl/hoop/HoopBusinessHoursModel.js.map +1 -0
  368. package/lib/models/impl/hoop/HoopDescriptionModel.js +2 -64
  369. package/lib/models/impl/hoop/HoopDescriptionModel.js.map +1 -0
  370. package/lib/models/impl/hoop/HoopHolidaysImplModel.js +2 -118
  371. package/lib/models/impl/hoop/HoopHolidaysImplModel.js.map +1 -0
  372. package/lib/models/impl/hoop/HoopNotesImplModel.js +2 -117
  373. package/lib/models/impl/hoop/HoopNotesImplModel.js.map +1 -0
  374. package/lib/models/impl/hoop/HoopOperationsImplModel.js +2 -161
  375. package/lib/models/impl/hoop/HoopOperationsImplModel.js.map +1 -0
  376. package/lib/models/impl/hoop/HoopOverrideImplModel.js +2 -143
  377. package/lib/models/impl/hoop/HoopOverrideImplModel.js.map +1 -0
  378. package/lib/models/impl/hoop/HoopPartialDaysImplModel.js +2 -140
  379. package/lib/models/impl/hoop/HoopPartialDaysImplModel.js.map +1 -0
  380. package/lib/models/impl/hoop/HoopProfilesListImplModel.js +2 -104
  381. package/lib/models/impl/hoop/HoopProfilesListImplModel.js.map +1 -0
  382. package/lib/models/impl/hoop/HoopWeeklyTimingModel.js +2 -86
  383. package/lib/models/impl/hoop/HoopWeeklyTimingModel.js.map +1 -0
  384. package/lib/models/index.js +2 -53
  385. package/lib/models/index.js.map +1 -0
  386. package/lib/models/interface/IBaseModel.js +2 -2
  387. package/lib/models/interface/IBaseModel.js.map +1 -0
  388. package/lib/models/types/AgentScorecard.type.js +2 -7
  389. package/lib/models/types/AgentScorecard.type.js.map +1 -0
  390. package/lib/models/types/AuditLog.type.js +2 -10
  391. package/lib/models/types/AuditLog.type.js.map +1 -0
  392. package/lib/models/types/CallLog.type.js +2 -10
  393. package/lib/models/types/CallLog.type.js.map +1 -0
  394. package/lib/models/types/ChannelSetting.type.js +2 -11
  395. package/lib/models/types/ChannelSetting.type.js.map +1 -0
  396. package/lib/models/types/CxConfig.type.js +2 -43
  397. package/lib/models/types/CxConfig.type.js.map +1 -0
  398. package/lib/models/types/Hoop.type.js +2 -13
  399. package/lib/models/types/Hoop.type.js.map +1 -0
  400. package/lib/models/types/Navigation.type.js +2 -8
  401. package/lib/models/types/Navigation.type.js.map +1 -0
  402. package/lib/models/types/Profile.type.js +2 -2
  403. package/lib/models/types/Profile.type.js.map +1 -0
  404. package/lib/models/types/QueueDetails.type.js +2 -7
  405. package/lib/models/types/QueueDetails.type.js.map +1 -0
  406. package/lib/models/types/TaskComplete.type.js +2 -6
  407. package/lib/models/types/TaskComplete.type.js.map +1 -0
  408. package/lib/models/types/TaskInfoPanel.type.js +2 -7
  409. package/lib/models/types/TaskInfoPanel.type.js.map +1 -0
  410. package/lib/server.js +2 -39
  411. package/lib/server.js.map +1 -0
  412. package/lib/twilio/abstract/ServiceObjectStore.js +2 -10
  413. package/lib/twilio/abstract/ServiceObjectStore.js.map +1 -0
  414. package/lib/twilio/abstract/ServiceOpenRequest.js +2 -10
  415. package/lib/twilio/abstract/ServiceOpenRequest.js.map +1 -0
  416. package/lib/twilio/abstract/ServiceRequest.js +2 -7
  417. package/lib/twilio/abstract/ServiceRequest.js.map +1 -0
  418. package/lib/twilio/abstract/ServiceResource.js +2 -37
  419. package/lib/twilio/abstract/ServiceResource.js.map +1 -0
  420. package/lib/twilio/abstract/ServiceResourceFactory.js +2 -18
  421. package/lib/twilio/abstract/ServiceResourceFactory.js.map +1 -0
  422. package/lib/twilio/abstract/ServiceTransaction.js +2 -11
  423. package/lib/twilio/abstract/ServiceTransaction.js.map +1 -0
  424. package/lib/twilio/abstract/SyncServiceItemResource.js +2 -60
  425. package/lib/twilio/abstract/SyncServiceItemResource.js.map +1 -0
  426. package/lib/twilio/abstract/TwilioClientConfig.js +2 -1
  427. package/lib/twilio/abstract/TwilioClientConfig.js.map +1 -0
  428. package/lib/twilio/impl/TwilioAPIKeyConfig.js +2 -31
  429. package/lib/twilio/impl/TwilioAPIKeyConfig.js.map +1 -0
  430. package/lib/twilio/impl/TwilioAuthTokenConfig.js +2 -24
  431. package/lib/twilio/impl/TwilioAuthTokenConfig.js.map +1 -0
  432. package/lib/twilio/impl/TwilioClient.js +2 -21
  433. package/lib/twilio/impl/TwilioClient.js.map +1 -0
  434. package/lib/twilio/impl/message/messageService.js +2 -42
  435. package/lib/twilio/impl/message/messageService.js.map +1 -0
  436. package/lib/twilio/impl/sync/SyncDocument.js +2 -52
  437. package/lib/twilio/impl/sync/SyncDocument.js.map +1 -0
  438. package/lib/twilio/impl/sync/SyncDocumentTransaction.js +2 -31
  439. package/lib/twilio/impl/sync/SyncDocumentTransaction.js.map +1 -0
  440. package/lib/twilio/impl/sync/SyncList.js +2 -52
  441. package/lib/twilio/impl/sync/SyncList.js.map +1 -0
  442. package/lib/twilio/impl/sync/SyncListItem.js +2 -22
  443. package/lib/twilio/impl/sync/SyncListItem.js.map +1 -0
  444. package/lib/twilio/impl/sync/SyncListTransaction.js +2 -31
  445. package/lib/twilio/impl/sync/SyncListTransaction.js.map +1 -0
  446. package/lib/twilio/impl/sync/SyncMap.js +2 -139
  447. package/lib/twilio/impl/sync/SyncMap.js.map +1 -0
  448. package/lib/twilio/impl/sync/SyncMapItem.js +2 -7
  449. package/lib/twilio/impl/sync/SyncMapItem.js.map +1 -0
  450. package/lib/twilio/impl/sync/SyncMapTransaction.js +2 -38
  451. package/lib/twilio/impl/sync/SyncMapTransaction.js.map +1 -0
  452. package/lib/twilio/impl/sync/SyncOpenRequest.js +2 -24
  453. package/lib/twilio/impl/sync/SyncOpenRequest.js.map +1 -0
  454. package/lib/twilio/impl/sync/SyncRequest.js +2 -21
  455. package/lib/twilio/impl/sync/SyncRequest.js.map +1 -0
  456. package/lib/twilio/impl/sync/SyncResource.js +2 -97
  457. package/lib/twilio/impl/sync/SyncResource.js.map +1 -0
  458. package/lib/twilio/impl/sync/SyncServiceFactory.js +2 -117
  459. package/lib/twilio/impl/sync/SyncServiceFactory.js.map +1 -0
  460. package/lib/twilio/interface/IDirection.js +2 -2
  461. package/lib/twilio/interface/IDirection.js.map +1 -0
  462. package/lib/twilio/interface/ILink.js +2 -2
  463. package/lib/twilio/interface/ILink.js.map +1 -0
  464. package/lib/twilio/interface/IServiceDBOpenRequest.js +2 -2
  465. package/lib/twilio/interface/IServiceDBOpenRequest.js.map +1 -0
  466. package/lib/twilio/interface/IServiceObjectStore.js +2 -2
  467. package/lib/twilio/interface/IServiceObjectStore.js.map +1 -0
  468. package/lib/twilio/interface/IServiceObjectStoreParameters.js +2 -2
  469. package/lib/twilio/interface/IServiceObjectStoreParameters.js.map +1 -0
  470. package/lib/twilio/interface/IServiceRequest.js +2 -2
  471. package/lib/twilio/interface/IServiceRequest.js.map +1 -0
  472. package/lib/twilio/interface/IServiceResource.js +2 -2
  473. package/lib/twilio/interface/IServiceResource.js.map +1 -0
  474. package/lib/twilio/interface/IServiceTransation.js +2 -2
  475. package/lib/twilio/interface/IServiceTransation.js.map +1 -0
  476. package/lib/twilio/interface/ISubResourceUri.js +2 -2
  477. package/lib/twilio/interface/ISubResourceUri.js.map +1 -0
  478. package/lib/twilio/interface/ISyncItemData.js +2 -1
  479. package/lib/twilio/interface/ISyncItemData.js.map +1 -0
  480. package/lib/twilio/interface/ISyncObjectStoreParameters.js +2 -1
  481. package/lib/twilio/interface/ISyncObjectStoreParameters.js.map +1 -0
  482. package/lib/twilio/interface/ISyncTransactionOptions.js +2 -2
  483. package/lib/twilio/interface/ISyncTransactionOptions.js.map +1 -0
  484. package/package.json +10 -2
@@ -1,61 +1,2 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.HoopProfilesListControllerAConnect = void 0;
13
- const DatabaseConfig_1 = require("../../config/DatabaseConfig");
14
- const HoopProfilesListImplModel_1 = require("../../models/impl/hoop/HoopProfilesListImplModel");
15
- class HoopProfilesListControllerAConnect {
16
- // Constructor to initialize HoopServiceFactory
17
- constructor(dbFactory) {
18
- this._dbFactory = dbFactory;
19
- }
20
- // Method to get data by profileId
21
- get(query) {
22
- return __awaiter(this, void 0, void 0, function* () {
23
- try {
24
- if (typeof query.instanceId !== "string") {
25
- throw new Error("instanceId must be a string");
26
- }
27
- // Open database connection
28
- const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
29
- const database = databaseConnection.result;
30
- // Start database transaction
31
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.hoopProfileList, "readwrite");
32
- // Access object store
33
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.hoopProfileList);
34
- // Get data by profileId from the object store
35
- let result = yield table.asyncGet(query.instanceId);
36
- // Use a Promise to handle the `IDBRequest`
37
- // const k = Array(result)
38
- const profiles = result.map((item) => {
39
- // Construct the profile model instance
40
- const profile = new HoopProfilesListImplModel_1.HoopProfilesListImplModel(item.Id, // profileId
41
- item.Name, // profileName
42
- 'EST', // timeZone (adjust if dynamic)
43
- new Date(item.LastModifiedTime), // createdAt
44
- new Date(item.LastModifiedTime) // updatedAt
45
- );
46
- if (profile.validationMessages.length > 0) {
47
- throw profile.validationMessages;
48
- }
49
- const result = profile.serialize;
50
- // Return the output format
51
- return result;
52
- });
53
- return profiles;
54
- }
55
- catch (error) {
56
- return error;
57
- }
58
- });
59
- }
60
- }
61
- exports.HoopProfilesListControllerAConnect = HoopProfilesListControllerAConnect;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.HoopProfilesListControllerAConnect=void 0;const e=require("tslib"),t=require("../../config/DatabaseConfig"),o=require("../../models/impl/hoop/HoopProfilesListImplModel");exports.HoopProfilesListControllerAConnect=class{constructor(e){this._dbFactory=e}get(i){return e.__awaiter(this,void 0,void 0,(function*(){try{if("string"!=typeof i.instanceId)throw new Error("instanceId must be a string");const e=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;let s=e.transaction(t.databaseConfig.tables.hoopProfileList,"readwrite").objectStore(t.databaseConfig.tables.hoopProfileList),a=yield s.asyncGet(i.instanceId);return a.map((e=>{const t=new o.HoopProfilesListImplModel(e.Id,e.Name,"EST",new Date(e.LastModifiedTime),new Date(e.LastModifiedTime));if(t.validationMessages.length>0)throw t.validationMessages;return t.serialize}))}catch(e){return e}}))}};
2
+ //# sourceMappingURL=HoopProfilesListController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HoopProfilesListController.js","sources":["../../../../controller/aws/HoopProfilesListController.ts"],"sourcesContent":[null],"names":["DatabaseConfig_1","require","HoopProfilesListImplModel_1","exports","HoopProfilesListControllerAConnect","constructor","dbFactory","this","_dbFactory","get","query","instanceId","Error","database","asyncOpen","databaseConfig","databaseName","version","result","table","transaction","tables","hoopProfileList","objectStore","asyncGet","map","item","profile","HoopProfilesListImplModel","Id","Name","Date","LastModifiedTime","validationMessages","length","serialize","error"],"mappings":"kIAG6DA,EAAAC,QAAA,+BAGgCC,EAAAD,QAAA,oDAE7FE,QA0DCC,mCA1DD,MAIE,WAAAC,CAAYC,GACVC,KAAKC,WAAaF,CACnB,CAKK,GAAAG,CAAIC,sDACR,IACE,GAAgC,iBAArBA,EAAMC,WACf,MAAM,IAAIC,MAAM,+BAGlB,MAKMC,SAJEN,KAAKC,WAAWM,UACpBd,EAAAe,eAAeC,aACfhB,iBAAeiB,UAEiBC,OAOpC,IAAIC,EALkBN,EAASO,YAC7BpB,EAAAe,eAAeM,OAAOC,gBACtB,aAGwBC,YACxBvB,EAAce,eAACM,OAAOC,iBAGpBJ,QAAeC,EAAMK,SAASd,EAAMC,YAoBxC,OAjBiBO,EAAOO,KAAKC,IAE7B,MAAMC,EAAU,IAAIzB,EAAA0B,0BAChBF,EAAKG,GACLH,EAAKI,KACL,MACA,IAAIC,KAAKL,EAAKM,kBACd,IAAID,KAAKL,EAAKM,mBAElB,GAAIL,EAAQM,mBAAmBC,OAAS,EACtC,MAAMP,EAAQM,mBAIhB,OAFeN,EAAQQ,SAEV,GAId,CAAC,MAAOC,GACP,OAAOA,CACR,IACF"}
@@ -1,63 +1,2 @@
1
- "use strict";
2
- /*
3
- *
4
- * This class defines a controller for managing Screen recording data, including CRUD operations.
5
- * It interacts with a database using SyncServiceFactory to perform database operations.
6
- *
7
- * PlaybackScreenrecordingsController:
8
- * - Manages CRUD operations for Screen recording data.
9
- * - Utilizes SyncServiceFactory to interact with the database.
10
- * - Implements methods for adding, editing, retrieving, and deleting quick links.
11
- */
12
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.PlaybackScreenrecordingsController = void 0;
23
- const DatabaseConfig_1 = require("../../config/DatabaseConfig");
24
- class PlaybackScreenrecordingsController {
25
- constructor(dbFactory) {
26
- this._dbFactory = dbFactory;
27
- }
28
- // Method to retrieve All Tasks
29
- getAll(query) {
30
- return __awaiter(this, void 0, void 0, function* () {
31
- try {
32
- const databaseConnection = yield this._dbFactory.asyncOpen("", 1);
33
- const database = databaseConnection.result;
34
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.playbackscreenrecordingsTable, "readwrite");
35
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.playbackscreenrecordingsTable);
36
- let result = yield table.asyncGetAll(query);
37
- return { result, meta: query };
38
- }
39
- catch (error) {
40
- console.log('error ', error);
41
- return error;
42
- }
43
- });
44
- }
45
- get(query) {
46
- return __awaiter(this, void 0, void 0, function* () {
47
- try {
48
- const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.tables.playbackscreenrecordingsTable, DatabaseConfig_1.databaseConfig.version);
49
- // console.log("Step-1:::", databaseConnection );
50
- const database = databaseConnection.result;
51
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.playbackscreenrecordingsTable, "readwrite");
52
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.playbackscreenrecordingsTable);
53
- let result = yield table.get(query.id);
54
- return result;
55
- }
56
- catch (error) {
57
- console.log('error ', error);
58
- throw error;
59
- }
60
- });
61
- }
62
- }
63
- exports.PlaybackScreenrecordingsController = PlaybackScreenrecordingsController;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.PlaybackScreenrecordingsController=void 0;const e=require("tslib"),r=require("../../config/DatabaseConfig");exports.PlaybackScreenrecordingsController=class{constructor(e){this._dbFactory=e}getAll(t){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=(yield this._dbFactory.asyncOpen("",1)).result;let a=e.transaction(r.databaseConfig.tables.playbackscreenrecordingsTable,"readwrite").objectStore(r.databaseConfig.tables.playbackscreenrecordingsTable);return{result:yield a.asyncGetAll(t),meta:t}}catch(e){return console.log("error ",e),e}}))}get(t){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=(yield this._dbFactory.asyncOpen(r.databaseConfig.tables.playbackscreenrecordingsTable,r.databaseConfig.version)).result;let a=e.transaction(r.databaseConfig.tables.playbackscreenrecordingsTable,"readwrite").objectStore(r.databaseConfig.tables.playbackscreenrecordingsTable);return yield a.get(t.id)}catch(e){throw console.log("error ",e),e}}))}};
2
+ //# sourceMappingURL=PlaybackScreenrecordings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlaybackScreenrecordings.js","sources":["../../../../controller/aws/PlaybackScreenrecordings.ts"],"sourcesContent":[null],"names":["DatabaseConfig_1","require","exports","PlaybackScreenrecordingsController","constructor","dbFactory","this","_dbFactory","getAll","query","database","asyncOpen","result","table","transaction","databaseConfig","tables","playbackscreenrecordingsTable","objectStore","asyncGetAll","meta","error","console","log","get","version","id"],"mappings":"kIAW6DA,EAAAC,QAAA,+BAO7DC,QAqCCC,mCArCD,MAGI,WAAAC,CAAYC,GACRC,KAAKC,WAAaF,CACrB,CAGK,MAAAG,CAAOC,sDACT,IACI,MACMC,SAD6CJ,KAAKC,WAAWI,UAAU,GAAI,IAC7CC,OAEpC,IAAIC,EADkBH,EAASI,YAAYd,EAAAe,eAAeC,OAAOC,8BAA+B,aACtEC,YAAYlB,EAAce,eAACC,OAAOC,+BAE5D,MAAO,CAAEL,aADUC,EAAMM,YAAYV,GACpBW,KAAMX,EAC1B,CAAC,MAAOY,GAEL,OADAC,QAAQC,IAAI,SAAUF,GACfA,CACV,IACJ,CAEK,GAAAG,CAAIf,sDACN,IACI,MAEMC,SAF6CJ,KAAKC,WAAWI,UAAUX,iBAAegB,OAAOC,8BAA+BjB,iBAAeyB,UAE7Gb,OAEpC,IAAIC,EADkBH,EAASI,YAAYd,EAAAe,eAAeC,OAAOC,8BAA+B,aACtEC,YAAYlB,EAAce,eAACC,OAAOC,+BAE5D,aADmBJ,EAAMW,IAAIf,EAAMiB,GAGtC,CAAC,MAAOL,GAEL,MADAC,QAAQC,IAAI,SAAUF,GAChBA,CACT,IACJ"}
@@ -1,177 +1,2 @@
1
- "use strict";
2
- /*
3
- *
4
- * This class defines a controller for managing queue details data, including CRUD operations.
5
- * It interacts with a database using SyncServiceFactory to perform database operations.
6
- *
7
- * RealTimeReportsQueueDetailsController:
8
- * - Manages CRUD operations for queue details data.
9
- * - Utilizes SyncServiceFactory to interact with the database.
10
- * - Implements methods for adding, editing, retrieving, and deleting queue details.
11
- */
12
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.AgentActionsController = void 0;
23
- const DatabaseConfig_1 = require("../../config/DatabaseConfig");
24
- const AgentActionsModel_1 = require("../../models/impl/AgentActionsModel");
25
- class AgentActionsController {
26
- constructor(dbFactory) {
27
- this._dbFactory = dbFactory;
28
- }
29
- /**
30
- * Adds a new queue details record to the database.
31
- *
32
- * This method validates the provided queue details data, opens a connection
33
- * to the database, starts a transaction, and adds the data to the specified
34
- * object store. If validation fails or any error occurs during the database
35
- * operation, it throws an error.
36
- *
37
- * @param {AgentActionsModel} data - The queue details data to be added.
38
- * @returns {Promise<any>} - Returns a promise with the result of the database operation.
39
- */
40
- add(data) {
41
- return __awaiter(this, void 0, void 0, function* () {
42
- try {
43
- const AgentScorecarddetails = new AgentActionsModel_1.AgentActionsModel(data.taskSid, data.logs, data.callSid, data.transfer);
44
- if (AgentScorecarddetails.validationMessages.length > 0) {
45
- throw AgentScorecarddetails.validationMessages; // Throw error if data validation fails
46
- }
47
- // Open database connection
48
- const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
49
- const database = databaseConnection.result;
50
- // Start database transaction
51
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.agentActionsTable, "readwrite");
52
- // Access object store
53
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.agentActionsTable);
54
- // Add new data to the object store
55
- let result = table.add(data, data.taskSid, 24 * 3 * 60 * 60);
56
- return result;
57
- }
58
- catch (error) {
59
- console.log("Error occurred:", error);
60
- return error;
61
- }
62
- });
63
- }
64
- /**
65
- * Edits an existing queue details record in the database.
66
- *
67
- * This method validates the provided queue details data, opens a connection
68
- * to the database, starts a transaction, and updates the data in the specified
69
- * object store. If validation fails or any error occurs during the database
70
- * operation, it throws an error.
71
- *
72
- * @param {AgentActionsModel} data - The queue details data to be edited.
73
- * @returns {Promise<any>} - Returns a promise with the result of the database operation.
74
- */
75
- edit(data) {
76
- return __awaiter(this, void 0, void 0, function* () {
77
- try {
78
- const AgentScorecarddetails = new AgentActionsModel_1.AgentActionsModel(data.taskSid, data.logs, data.callSid, data.transfer);
79
- if (AgentScorecarddetails.validationMessages.length > 0) {
80
- throw AgentScorecarddetails.validationMessages; // Throw error if data validation fails
81
- }
82
- // Open database connection
83
- const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
84
- const database = databaseConnection.result;
85
- // Start database transaction
86
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.agentActionsTable, "readwrite");
87
- // Access object store
88
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.agentActionsTable);
89
- const key = data.taskSid;
90
- // Update existing data in the object store
91
- let result = table.put(data, key);
92
- return result;
93
- }
94
- catch (error) {
95
- console.log("Error occurred:", error);
96
- return error;
97
- }
98
- });
99
- }
100
- /**
101
- * Retrieves all queue details records from the database.
102
- *
103
- * This method opens a connection to the database, starts a transaction,
104
- * retrieves all records from the specified object store, and returns them.
105
- * If any error occurs during the database operation, it throws an error.
106
- *
107
- * @param {SearchParameterType} query - The search parameters for retrieving data.
108
- * @returns {Promise<any>} - Returns a promise with the result of the database operation.
109
- */
110
- getAll(query) {
111
- return __awaiter(this, void 0, void 0, function* () {
112
- try {
113
- // Open database connection
114
- const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
115
- const database = databaseConnection.result;
116
- // Start database transaction
117
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.agentActionsTable, "readwrite");
118
- // Access object store
119
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.agentActionsTable);
120
- let result = yield table.getAll(query);
121
- return { result, meta: query }; // Return result with meta data
122
- }
123
- catch (error) {
124
- return error;
125
- }
126
- });
127
- }
128
- get(query) {
129
- return __awaiter(this, void 0, void 0, function* () {
130
- try {
131
- const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
132
- const database = databaseConnection.result;
133
- // Start database transaction
134
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.agentActionsTable, "readwrite");
135
- // Access object store
136
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.agentActionsTable);
137
- const result = yield table.get(query.taskSid);
138
- return result;
139
- }
140
- catch (error) {
141
- console.error("Error retrieving audit log:", error);
142
- return error;
143
- }
144
- });
145
- }
146
- /**
147
- * Deletes a queue details record from the database.
148
- *
149
- * This method opens a connection to the database, starts a transaction,
150
- * and deletes the record with the specified ID from the object store.
151
- * If any error occurs during the database operation, it throws an error.
152
- *
153
- * @param {Pick<AgentActionsModel, "id">} query - The ID of the record to be deleted.
154
- * @returns {Promise<any>} - Returns a promise with the result of the database operation.
155
- */
156
- delete(query) {
157
- return __awaiter(this, void 0, void 0, function* () {
158
- try {
159
- // Open database connection
160
- const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
161
- const database = databaseConnection.result;
162
- // Start database transaction
163
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.agentActionsTable, "readwrite");
164
- // Access object store
165
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.agentActionsTable);
166
- // Delete data from the object store
167
- let result = table.delete(query.taskSid);
168
- return result;
169
- }
170
- catch (error) {
171
- console.log("Error occurred:", error);
172
- return error;
173
- }
174
- });
175
- }
176
- }
177
- exports.AgentActionsController = AgentActionsController;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.AgentActionsController=void 0;const t=require("tslib"),e=require("../../config/DatabaseConfig"),a=require("../../models/impl/AgentActionsModel");exports.AgentActionsController=class{constructor(t){this._dbFactory=t}add(o){return t.__awaiter(this,void 0,void 0,(function*(){try{const t=new a.AgentActionsModel(o.taskSid,o.logs,o.callSid,o.transfer);if(t.validationMessages.length>0)throw t.validationMessages;const n=(yield this._dbFactory.asyncOpen(e.databaseConfig.databaseName,e.databaseConfig.version)).result;return n.transaction(e.databaseConfig.tables.agentActionsTable,"readwrite").objectStore(e.databaseConfig.tables.agentActionsTable).add(o,o.taskSid,259200)}catch(t){return console.log("Error occurred:",t),t}}))}edit(o){return t.__awaiter(this,void 0,void 0,(function*(){try{const t=new a.AgentActionsModel(o.taskSid,o.logs,o.callSid,o.transfer);if(t.validationMessages.length>0)throw t.validationMessages;const n=(yield this._dbFactory.asyncOpen(e.databaseConfig.databaseName,e.databaseConfig.version)).result;let s=n.transaction(e.databaseConfig.tables.agentActionsTable,"readwrite").objectStore(e.databaseConfig.tables.agentActionsTable);const r=o.taskSid;return s.put(o,r)}catch(t){return console.log("Error occurred:",t),t}}))}getAll(a){return t.__awaiter(this,void 0,void 0,(function*(){try{const t=(yield this._dbFactory.asyncOpen(e.databaseConfig.databaseName,e.databaseConfig.version)).result;let o=t.transaction(e.databaseConfig.tables.agentActionsTable,"readwrite").objectStore(e.databaseConfig.tables.agentActionsTable);return{result:yield o.getAll(a),meta:a}}catch(t){return t}}))}get(a){return t.__awaiter(this,void 0,void 0,(function*(){try{const t=(yield this._dbFactory.asyncOpen(e.databaseConfig.databaseName,e.databaseConfig.version)).result;let o=t.transaction(e.databaseConfig.tables.agentActionsTable,"readwrite").objectStore(e.databaseConfig.tables.agentActionsTable);return yield o.get(a.taskSid)}catch(t){return console.error("Error retrieving audit log:",t),t}}))}delete(a){return t.__awaiter(this,void 0,void 0,(function*(){try{const t=(yield this._dbFactory.asyncOpen(e.databaseConfig.databaseName,e.databaseConfig.version)).result;return t.transaction(e.databaseConfig.tables.agentActionsTable,"readwrite").objectStore(e.databaseConfig.tables.agentActionsTable).delete(a.taskSid)}catch(t){return console.log("Error occurred:",t),t}}))}};
2
+ //# sourceMappingURL=AgentActionsController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentActionsController.js","sources":["../../../../controller/twilio/AgentActionsController.ts"],"sourcesContent":[null],"names":["DatabaseConfig_1","require","AgentActionsModel_1","exports","AgentActionsController","constructor","dbFactory","this","_dbFactory","add","data","AgentScorecarddetails","AgentActionsModel","taskSid","logs","callSid","transfer","validationMessages","length","database","asyncOpen","databaseConfig","databaseName","version","result","transaction","tables","agentActionsTable","objectStore","error","console","log","edit","table","key","put","getAll","query","meta","get","delete"],"mappings":"sHAe6DA,EAAAC,QAAA,+BAEWC,EAAAD,QAAA,uCAGxEE,QAuMCC,uBAvMD,MAGI,WAAAC,CAAYC,GACRC,KAAKC,WAAaF,CACrB,CAaK,GAAAG,CAAIC,sDACN,IACI,MAAMC,EAAwB,IAAIT,EAAAU,kBAC9BF,EAAKG,QAASH,EAAKI,KAAMJ,EAAKK,QAASL,EAAKM,UAEhD,GAAIL,EAAsBM,mBAAmBC,OAAS,EAClD,MAAMP,EAAsBM,mBAGhC,MAKME,SAJIZ,KAAKC,WAAWY,UAClBpB,EAAAqB,eAAeC,aACftB,iBAAeuB,UAEaC,OAYpC,OAVsBL,EAASM,YAC3BzB,EAAAqB,eAAeK,OAAOC,kBACtB,aAGsBC,YACtB5B,EAAcqB,eAACK,OAAOC,mBAGPlB,IAAIC,EAAMA,EAAKG,QAAS,OAE9C,CAAC,MAAOgB,GAEL,OADAC,QAAQC,IAAI,kBAAmBF,GACxBA,CACV,IACJ,CAaK,IAAAG,CAAKtB,sDACP,IACI,MAAMC,EAAwB,IAAIT,EAAAU,kBAC9BF,EAAKG,QAASH,EAAKI,KAAMJ,EAAKK,QAASL,EAAKM,UAEhD,GAAIL,EAAsBM,mBAAmBC,OAAS,EAClD,MAAMP,EAAsBM,mBAGhC,MAKME,SAJIZ,KAAKC,WAAWY,UAClBpB,EAAAqB,eAAeC,aACftB,iBAAeuB,UAEaC,OAOpC,IAAIS,EALkBd,EAASM,YAC3BzB,EAAAqB,eAAeK,OAAOC,kBACtB,aAGsBC,YACtB5B,EAAcqB,eAACK,OAAOC,mBAE1B,MAAMO,EAAMxB,EAAKG,QAGjB,OADaoB,EAAME,IAAIzB,EAAMwB,EAEhC,CAAC,MAAOL,GAEL,OADAC,QAAQC,IAAI,kBAAmBF,GACxBA,CACV,IACJ,CAYK,MAAAO,CAAOC,sDACT,IAEI,MAMMlB,SALIZ,KAAKC,WAAWY,UAClBpB,EAAAqB,eAAeC,aACftB,iBAAeuB,UAGaC,OAQpC,IAAIS,EALkBd,EAASM,YAC3BzB,EAAAqB,eAAeK,OAAOC,kBACtB,aAGsBC,YACtB5B,EAAcqB,eAACK,OAAOC,mBAI1B,MAAO,CAAEH,aADeS,EAAMG,OAAOC,GACpBC,KAAMD,EAE1B,CAAC,MAAOR,GACL,OAAOA,CACV,IACJ,CAEK,GAAAU,CAAIF,sDACN,IACI,MAMMlB,SALIZ,KAAKC,WAAWY,UAClBpB,EAAAqB,eAAeC,aACftB,iBAAeuB,UAGaC,OAQpC,IAAIS,EALkBd,EAASM,YAC3BzB,EAAAqB,eAAeK,OAAOC,kBACtB,aAGsBC,YACtB5B,EAAcqB,eAACK,OAAOC,mBAI1B,aADqBM,EAAMM,IAAIF,EAAMxB,QAExC,CAAC,MAAOgB,GAEL,OADAC,QAAQD,MAAM,8BAA+BA,GACtCA,CACV,IACJ,CAYK,OAAOQ,sDACT,IAEI,MAKMlB,SAJIZ,KAAKC,WAAWY,UAClBpB,EAAAqB,eAAeC,aACftB,iBAAeuB,UAEaC,OAYpC,OAVsBL,EAASM,YAC3BzB,EAAAqB,eAAeK,OAAOC,kBACtB,aAGsBC,YACtB5B,EAAcqB,eAACK,OAAOC,mBAGPa,OAAOH,EAAMxB,QAEnC,CAAC,MAAOgB,GAEL,OADAC,QAAQC,IAAI,kBAAmBF,GACxBA,CACV,IACJ"}
@@ -1,173 +1,2 @@
1
- "use strict";
2
- /*
3
- *
4
- * This class defines a controller for managing queue details data, including CRUD operations.
5
- * It interacts with a database using SyncServiceFactory to perform database operations.
6
- *
7
- * RealTimeReportsQueueDetailsController:
8
- * - Manages CRUD operations for queue details data.
9
- * - Utilizes SyncServiceFactory to interact with the database.
10
- * - Implements methods for adding, editing, retrieving, and deleting queue details.
11
- */
12
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.AgentScorecardController = void 0;
23
- const DatabaseConfig_1 = require("../../config/DatabaseConfig");
24
- const AgentScorecardModel_1 = require("../../models/impl/AgentScorecardModel");
25
- const AgentScorecardFilter_1 = require("./filterImpl/AgentScorecardFilter");
26
- class AgentScorecardController {
27
- constructor(dbFactory) {
28
- this._dbFactory = dbFactory;
29
- }
30
- /**
31
- * Adds a new queue details record to the database.
32
- *
33
- * This method validates the provided queue details data, opens a connection
34
- * to the database, starts a transaction, and adds the data to the specified
35
- * object store. If validation fails or any error occurs during the database
36
- * operation, it throws an error.
37
- *
38
- * @param {AgentScorecardModel} data - The queue details data to be added.
39
- * @returns {Promise<any>} - Returns a promise with the result of the database operation.
40
- */
41
- add(data) {
42
- return __awaiter(this, void 0, void 0, function* () {
43
- try {
44
- const AgentScorecarddetails = new AgentScorecardModel_1.AgentScorecardModel(data.id, data.ht, data.uniqueName, data.tsCompleted, data.tsCreated, data.taskSid, data.queueName, data.channel, data.HoldTimeline, data.UnHoldTimeline, data.taskCreated, data.reservationCreated, data.tsHangUp, data.from, data.to, data.isOutbound, data.queueSid, data.hang_up_by, data.createdAt, data.updatedAt);
45
- if (AgentScorecarddetails.validationMessages.length > 0) {
46
- throw AgentScorecarddetails.validationMessages; // Throw error if data validation fails
47
- }
48
- // Open database connection
49
- const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
50
- const database = databaseConnection.result;
51
- // Start database transaction
52
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.agentScorecardTable, "readwrite");
53
- // Access object store
54
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.agentScorecardTable);
55
- // Add new data to the object store
56
- let result = table.add(data, data.id, 24 * 60 * 60);
57
- return result;
58
- }
59
- catch (error) {
60
- console.log("Error occurred:", error);
61
- return error;
62
- }
63
- });
64
- }
65
- /**
66
- * Edits an existing queue details record in the database.
67
- *
68
- * This method validates the provided queue details data, opens a connection
69
- * to the database, starts a transaction, and updates the data in the specified
70
- * object store. If validation fails or any error occurs during the database
71
- * operation, it throws an error.
72
- *
73
- * @param {AgentScorecardModel} data - The queue details data to be edited.
74
- * @returns {Promise<any>} - Returns a promise with the result of the database operation.
75
- */
76
- edit(data) {
77
- return __awaiter(this, void 0, void 0, function* () {
78
- try {
79
- const AgentScorecarddetails = new AgentScorecardModel_1.AgentScorecardModel(data.id, data.ht, data.uniqueName, data.tsCompleted, data.tsCreated, data.taskSid, data.queueName, data.channel, data.HoldTimeline, data.UnHoldTimeline, data.taskCreated, data.reservationCreated, data.tsHangUp, data.from, data.to, data.isOutbound, data.queueSid, data.hang_up_by, data.createdAt, data.updatedAt);
80
- if (AgentScorecarddetails.validationMessages.length > 0) {
81
- throw AgentScorecarddetails.validationMessages; // Throw error if data validation fails
82
- }
83
- // Open database connection
84
- const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
85
- const database = databaseConnection.result;
86
- // Start database transaction
87
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.agentScorecardTable, "readwrite");
88
- // Access object store
89
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.agentScorecardTable);
90
- const key = data.id;
91
- // Update existing data in the object store
92
- let result = table.put(data, key);
93
- return result;
94
- }
95
- catch (error) {
96
- console.log("Error occurred:", error);
97
- return error;
98
- }
99
- });
100
- }
101
- /**
102
- * Retrieves all queue details records from the database.
103
- *
104
- * This method opens a connection to the database, starts a transaction,
105
- * retrieves all records from the specified object store, and returns them.
106
- * If any error occurs during the database operation, it throws an error.
107
- *
108
- * @param {SearchParameterType} query - The search parameters for retrieving data.
109
- * @returns {Promise<any>} - Returns a promise with the result of the database operation.
110
- */
111
- getAll(query) {
112
- return __awaiter(this, void 0, void 0, function* () {
113
- try {
114
- // Open database connection
115
- const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
116
- const database = databaseConnection.result;
117
- // Start database transaction
118
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.agentScorecardTable, "readwrite");
119
- // Access object store
120
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.agentScorecardTable);
121
- const allowedFields = [
122
- "uniqueName"
123
- ];
124
- if (query.getFilterContent) {
125
- query.allowedFields = allowedFields;
126
- }
127
- query.category = "AgentScorecard";
128
- let result = yield table.getAll(query);
129
- if (query.getFilterContent) {
130
- result.filterContent = AgentScorecardFilter_1.AgentScorecardFilterService.getFilterData(result.filterOptions);
131
- }
132
- if ("filterOptions" in result) {
133
- delete result.filterOptions;
134
- }
135
- return { result, meta: query }; // Return result with meta data
136
- }
137
- catch (error) {
138
- return error;
139
- }
140
- });
141
- }
142
- /**
143
- * Deletes a queue details record from the database.
144
- *
145
- * This method opens a connection to the database, starts a transaction,
146
- * and deletes the record with the specified ID from the object store.
147
- * If any error occurs during the database operation, it throws an error.
148
- *
149
- * @param {Pick<AgentScorecardModel, "id">} query - The ID of the record to be deleted.
150
- * @returns {Promise<any>} - Returns a promise with the result of the database operation.
151
- */
152
- delete(query) {
153
- return __awaiter(this, void 0, void 0, function* () {
154
- try {
155
- // Open database connection
156
- const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
157
- const database = databaseConnection.result;
158
- // Start database transaction
159
- const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.agentScorecardTable, "readwrite");
160
- // Access object store
161
- let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.agentScorecardTable);
162
- // Delete data from the object store
163
- let result = table.delete(query.id);
164
- return result;
165
- }
166
- catch (error) {
167
- console.log("Error occurred:", error);
168
- return error;
169
- }
170
- });
171
- }
172
- }
173
- exports.AgentScorecardController = AgentScorecardController;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.AgentScorecardController=void 0;const e=require("tslib"),t=require("../../config/DatabaseConfig"),a=require("../../models/impl/AgentScorecardModel"),r=require("./filterImpl/AgentScorecardFilter");exports.AgentScorecardController=class{constructor(e){this._dbFactory=e}add(r){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=new a.AgentScorecardModel(r.id,r.ht,r.uniqueName,r.tsCompleted,r.tsCreated,r.taskSid,r.queueName,r.channel,r.HoldTimeline,r.UnHoldTimeline,r.taskCreated,r.reservationCreated,r.tsHangUp,r.from,r.to,r.isOutbound,r.queueSid,r.hang_up_by,r.createdAt,r.updatedAt);if(e.validationMessages.length>0)throw e.validationMessages;const o=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;return o.transaction(t.databaseConfig.tables.agentScorecardTable,"readwrite").objectStore(t.databaseConfig.tables.agentScorecardTable).add(r,r.id,86400)}catch(e){return console.log("Error occurred:",e),e}}))}edit(r){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=new a.AgentScorecardModel(r.id,r.ht,r.uniqueName,r.tsCompleted,r.tsCreated,r.taskSid,r.queueName,r.channel,r.HoldTimeline,r.UnHoldTimeline,r.taskCreated,r.reservationCreated,r.tsHangUp,r.from,r.to,r.isOutbound,r.queueSid,r.hang_up_by,r.createdAt,r.updatedAt);if(e.validationMessages.length>0)throw e.validationMessages;const o=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;let n=o.transaction(t.databaseConfig.tables.agentScorecardTable,"readwrite").objectStore(t.databaseConfig.tables.agentScorecardTable);const i=r.id;return n.put(r,i)}catch(e){return console.log("Error occurred:",e),e}}))}getAll(a){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;let o=e.transaction(t.databaseConfig.tables.agentScorecardTable,"readwrite").objectStore(t.databaseConfig.tables.agentScorecardTable);const n=["uniqueName"];a.getFilterContent&&(a.allowedFields=n),a.category="AgentScorecard";let i=yield o.getAll(a);return a.getFilterContent&&(i.filterContent=r.AgentScorecardFilterService.getFilterData(i.filterOptions)),"filterOptions"in i&&delete i.filterOptions,{result:i,meta:a}}catch(e){return e}}))}delete(a){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;return e.transaction(t.databaseConfig.tables.agentScorecardTable,"readwrite").objectStore(t.databaseConfig.tables.agentScorecardTable).delete(a.id)}catch(e){return console.log("Error occurred:",e),e}}))}};
2
+ //# sourceMappingURL=AgentScorecardController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentScorecardController.js","sources":["../../../../controller/twilio/AgentScorecardController.ts"],"sourcesContent":[null],"names":["DatabaseConfig_1","require","AgentScorecardModel_1","AgentScorecardFilter_1","exports","AgentScorecardController","constructor","dbFactory","this","_dbFactory","add","data","AgentScorecarddetails","id","ht","uniqueName","tsCompleted","tsCreated","taskSid","queueName","channel","HoldTimeline","UnHoldTimeline","taskCreated","reservationCreated","tsHangUp","from","to","isOutbound","queueSid","hang_up_by","createdAt","updatedAt","validationMessages","length","database","asyncOpen","databaseConfig","databaseName","version","result","transaction","tables","agentScorecardTable","objectStore","error","console","log","edit","table","key","put","getAll","query","allowedFields","getFilterContent","category","filterContent","AgentScorecardFilterService","getFilterData","filterOptions","meta","delete"],"mappings":"wHAe6DA,EAAAC,QAAA,+BAEeC,EAAAD,QAAA,yCACIE,EAAAF,QAAA,qCAIhFG,QAyLCC,yBAzLD,MAGE,WAAAC,CAAYC,GACVC,KAAKC,WAAaF,CACnB,CAaK,GAAAG,CAAIC,sDACR,IACE,MAAMC,EAAwB,IAAIV,sBAChCS,EAAKE,GAAIF,EAAKG,GAAIH,EAAKI,WAAYJ,EAAKK,YAAaL,EAAKM,UAAWN,EAAKO,QAASP,EAAKQ,UAAWR,EAAKS,QAAST,EAAKU,aACtHV,EAAKW,eAAgBX,EAAKY,YAAaZ,EAAKa,mBAAoBb,EAAKc,SAAUd,EAAKe,KAAMf,EAAKgB,GAC/FhB,EAAKiB,WAAYjB,EAAKkB,SAAUlB,EAAKmB,WAAYnB,EAAKoB,UAAWpB,EAAKqB,WAExE,GAAIpB,EAAsBqB,mBAAmBC,OAAS,EACpD,MAAMtB,EAAsBqB,mBAG9B,MAKME,SAJE3B,KAAKC,WAAW2B,UACpBpC,EAAAqC,eAAeC,aACftC,iBAAeuC,UAEiBC,OAYpC,OAVsBL,EAASM,YAC7BzC,EAAAqC,eAAeK,OAAOC,oBACtB,aAGwBC,YACxB5C,EAAcqC,eAACK,OAAOC,qBAGLjC,IAAIC,EAAMA,EAAKE,GAAI,MAEvC,CAAC,MAAOgC,GAEP,OADAC,QAAQC,IAAI,kBAAmBF,GACxBA,CACR,IACF,CAaK,IAAAG,CAAKrC,sDACT,IACE,MAAMC,EAAwB,IAAIV,sBAChCS,EAAKE,GAAIF,EAAKG,GAAIH,EAAKI,WAAYJ,EAAKK,YAAaL,EAAKM,UAAWN,EAAKO,QAASP,EAAKQ,UAAWR,EAAKS,QAAST,EAAKU,aACtHV,EAAKW,eAAgBX,EAAKY,YAAaZ,EAAKa,mBAAoBb,EAAKc,SAAUd,EAAKe,KAAMf,EAAKgB,GAC/FhB,EAAKiB,WAAYjB,EAAKkB,SAAUlB,EAAKmB,WAAYnB,EAAKoB,UAAWpB,EAAKqB,WAExE,GAAIpB,EAAsBqB,mBAAmBC,OAAS,EACpD,MAAMtB,EAAsBqB,mBAG9B,MAKME,SAJE3B,KAAKC,WAAW2B,UACpBpC,EAAAqC,eAAeC,aACftC,iBAAeuC,UAEiBC,OAOpC,IAAIS,EALkBd,EAASM,YAC7BzC,EAAAqC,eAAeK,OAAOC,oBACtB,aAGwBC,YACxB5C,EAAcqC,eAACK,OAAOC,qBAExB,MAAMO,EAAMvC,EAAKE,GAGjB,OADaoC,EAAME,IAAIxC,EAAMuC,EAE9B,CAAC,MAAOL,GAEP,OADAC,QAAQC,IAAI,kBAAmBF,GACxBA,CACR,IACF,CAYK,MAAAO,CAAOC,sDACX,IAEE,MAKMlB,SAJE3B,KAAKC,WAAW2B,UACpBpC,EAAAqC,eAAeC,aACftC,iBAAeuC,UAEiBC,OAOpC,IAAIS,EALkBd,EAASM,YAC7BzC,EAAAqC,eAAeK,OAAOC,oBACtB,aAGwBC,YACxB5C,EAAcqC,eAACK,OAAOC,qBAGxB,MAAMW,EAAiE,CACrE,cAEED,EAAME,mBACRF,EAAMC,cAAgBA,GAExBD,EAAMG,SAAW,iBACjB,IAAIhB,QAAoBS,EAAMG,OAAOC,GAOrC,OANIA,EAAME,mBACRf,EAAOiB,cAAgBtD,EAA2BuD,4BAACC,cAAcnB,EAAOoB,gBAEtE,kBAAmBpB,UACdA,EAAOoB,cAET,CAAEpB,SAAQqB,KAAMR,EACxB,CAAC,MAAOR,GACP,OAAOA,CACR,IACF,CAYK,OAAOQ,sDACX,IAEE,MAKMlB,SAJE3B,KAAKC,WAAW2B,UACpBpC,EAAAqC,eAAeC,aACftC,iBAAeuC,UAEiBC,OAYpC,OAVsBL,EAASM,YAC7BzC,EAAAqC,eAAeK,OAAOC,oBACtB,aAGwBC,YACxB5C,EAAcqC,eAACK,OAAOC,qBAGLmB,OAAOT,EAAMxC,GAEjC,CAAC,MAAOgC,GAEP,OADAC,QAAQC,IAAI,kBAAmBF,GACxBA,CACR,IACF"}