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.
- package/lib/aws/abstract/ServiceObjectStore.js +2 -10
- package/lib/aws/abstract/ServiceObjectStore.js.map +1 -0
- package/lib/aws/abstract/ServiceOpenRequest.js +2 -10
- package/lib/aws/abstract/ServiceOpenRequest.js.map +1 -0
- package/lib/aws/abstract/ServiceRequest.js +2 -7
- package/lib/aws/abstract/ServiceRequest.js.map +1 -0
- package/lib/aws/abstract/ServiceResource.js +2 -31
- package/lib/aws/abstract/ServiceResource.js.map +1 -0
- package/lib/aws/abstract/ServiceResourceFactory.js +2 -14
- package/lib/aws/abstract/ServiceResourceFactory.js.map +1 -0
- package/lib/aws/abstract/ServiceTransaction.js +2 -11
- package/lib/aws/abstract/ServiceTransaction.js.map +1 -0
- package/lib/aws/impl/AWSAPIConfig.js +2 -38
- package/lib/aws/impl/AWSAPIConfig.js.map +1 -0
- package/lib/aws/impl/AWSClient.js +2 -35
- package/lib/aws/impl/AWSClient.js.map +1 -0
- package/lib/aws/impl/AWSConnectAPIConfig.js +2 -38
- package/lib/aws/impl/AWSConnectAPIConfig.js.map +1 -0
- package/lib/aws/impl/DynamoDB/DynamoOpenRequest.js +2 -24
- package/lib/aws/impl/DynamoDB/DynamoOpenRequest.js.map +1 -0
- package/lib/aws/impl/DynamoDB/DynamoRequest.js +2 -21
- package/lib/aws/impl/DynamoDB/DynamoRequest.js.map +1 -0
- package/lib/aws/impl/DynamoDB/DynamoResourse.js +2 -45
- package/lib/aws/impl/DynamoDB/DynamoResourse.js.map +1 -0
- package/lib/aws/impl/DynamoDB/DynamoServiceFactory.js +2 -63
- package/lib/aws/impl/DynamoDB/DynamoServiceFactory.js.map +1 -0
- package/lib/aws/impl/DynamoDB/DynamoTable.js +2 -126
- package/lib/aws/impl/DynamoDB/DynamoTable.js.map +1 -0
- package/lib/aws/impl/DynamoDB/DynamoTransaction.js +2 -37
- package/lib/aws/impl/DynamoDB/DynamoTransaction.js.map +1 -0
- package/lib/aws/impl/HoopServices/HoopService.js +2 -124
- package/lib/aws/impl/HoopServices/HoopService.js.map +1 -0
- package/lib/aws/impl/HoopServices/HoopServiceFactory.js +2 -53
- package/lib/aws/impl/HoopServices/HoopServiceFactory.js.map +1 -0
- package/lib/aws/impl/HoopServices/HoopServiceOpenRequest.js +2 -24
- package/lib/aws/impl/HoopServices/HoopServiceOpenRequest.js.map +1 -0
- package/lib/aws/impl/HoopServices/HoopServiceResource.js +2 -46
- package/lib/aws/impl/HoopServices/HoopServiceResource.js.map +1 -0
- package/lib/aws/impl/HoopServices/HoopServiceTransaction.js +2 -37
- package/lib/aws/impl/HoopServices/HoopServiceTransaction.js.map +1 -0
- package/lib/aws/interface/IDirection.js +2 -2
- package/lib/aws/interface/IDirection.js.map +1 -0
- package/lib/aws/interface/ILink.js +2 -2
- package/lib/aws/interface/ILink.js.map +1 -0
- package/lib/aws/interface/IServiceDBOpenRequest.js +2 -2
- package/lib/aws/interface/IServiceDBOpenRequest.js.map +1 -0
- package/lib/aws/interface/IServiceObjectStore.js +2 -2
- package/lib/aws/interface/IServiceObjectStore.js.map +1 -0
- package/lib/aws/interface/IServiceObjectStoreParameters.js +2 -2
- package/lib/aws/interface/IServiceObjectStoreParameters.js.map +1 -0
- package/lib/aws/interface/IServiceRequest.js +2 -2
- package/lib/aws/interface/IServiceRequest.js.map +1 -0
- package/lib/aws/interface/IServiceResource.js +2 -2
- package/lib/aws/interface/IServiceResource.js.map +1 -0
- package/lib/aws/interface/IServiceTransation.js +2 -2
- package/lib/aws/interface/IServiceTransation.js.map +1 -0
- package/lib/aws/interface/ISubResourceUri.js +2 -2
- package/lib/aws/interface/ISubResourceUri.js.map +1 -0
- package/lib/aws/interface/ISyncItemData.js +2 -1
- package/lib/aws/interface/ISyncItemData.js.map +1 -0
- package/lib/aws/interface/ISyncObjectStoreParameters.js +2 -1
- package/lib/aws/interface/ISyncObjectStoreParameters.js.map +1 -0
- package/lib/aws/interface/ISyncTransactionOptions.js +2 -2
- package/lib/aws/interface/ISyncTransactionOptions.js.map +1 -0
- package/lib/common/abstract/CommonError.js +2 -12
- package/lib/common/abstract/CommonError.js.map +1 -0
- package/lib/common/abstract/Database.js +2 -58
- package/lib/common/abstract/Database.js.map +1 -0
- package/lib/common/abstract/DatabaseClient.js +2 -21
- package/lib/common/abstract/DatabaseClient.js.map +1 -0
- package/lib/common/abstract/DatabaseClientConfig.js +2 -9
- package/lib/common/abstract/DatabaseClientConfig.js.map +1 -0
- package/lib/common/abstract/DatabaseFactory.js +2 -32
- package/lib/common/abstract/DatabaseFactory.js.map +1 -0
- package/lib/common/abstract/DatabaseObjectStore.js +2 -13
- package/lib/common/abstract/DatabaseObjectStore.js.map +1 -0
- package/lib/common/abstract/DatabaseOpenRequest.js +2 -13
- package/lib/common/abstract/DatabaseOpenRequest.js.map +1 -0
- package/lib/common/abstract/DatabaseRequest.js +2 -14
- package/lib/common/abstract/DatabaseRequest.js.map +1 -0
- package/lib/common/abstract/DatabaseTransaction.js +2 -13
- package/lib/common/abstract/DatabaseTransaction.js.map +1 -0
- package/lib/common/abstract/Filter.js +2 -30
- package/lib/common/abstract/Filter.js.map +1 -0
- package/lib/common/enum/ErrorTypes.js +2 -9
- package/lib/common/enum/ErrorTypes.js.map +1 -0
- package/lib/common/enum/FilterTypes.js +2 -14
- package/lib/common/enum/FilterTypes.js.map +1 -0
- package/lib/common/interface/IDatabaesInfo.js +2 -2
- package/lib/common/interface/IDatabaesInfo.js.map +1 -0
- package/lib/common/interface/IDatabase.js +2 -2
- package/lib/common/interface/IDatabase.js.map +1 -0
- package/lib/common/interface/IDatabaseClient.js +2 -2
- package/lib/common/interface/IDatabaseClient.js.map +1 -0
- package/lib/common/interface/IDatabaseConfig.js +2 -10
- package/lib/common/interface/IDatabaseConfig.js.map +1 -0
- package/lib/common/interface/IDatabaseDBOpenRequest.js +2 -2
- package/lib/common/interface/IDatabaseDBOpenRequest.js.map +1 -0
- package/lib/common/interface/IDatabaseFactory.js +2 -2
- package/lib/common/interface/IDatabaseFactory.js.map +1 -0
- package/lib/common/interface/IDatabaseObjectStore.js +2 -2
- package/lib/common/interface/IDatabaseObjectStore.js.map +1 -0
- package/lib/common/interface/IDatabaseObjectStoreParameters.js +2 -2
- package/lib/common/interface/IDatabaseObjectStoreParameters.js.map +1 -0
- package/lib/common/interface/IDatabaseRecord.js +2 -2
- package/lib/common/interface/IDatabaseRecord.js.map +1 -0
- package/lib/common/interface/IDatabaseRequest.js +2 -2
- package/lib/common/interface/IDatabaseRequest.js.map +1 -0
- package/lib/common/interface/IDatabaseTransaction.js +2 -2
- package/lib/common/interface/IDatabaseTransaction.js.map +1 -0
- package/lib/common/interface/IDatabaseTransactionOptions.js +2 -2
- package/lib/common/interface/IDatabaseTransactionOptions.js.map +1 -0
- package/lib/common/interface/IError.js +2 -2
- package/lib/common/interface/IError.js.map +1 -0
- package/lib/common/interface/IErrorDetails.js +2 -2
- package/lib/common/interface/IErrorDetails.js.map +1 -0
- package/lib/common/interface/IFilter.js +2 -2
- package/lib/common/interface/IFilter.js.map +1 -0
- package/lib/common/type/DatabaseReadyType.js +2 -2
- package/lib/common/type/DatabaseReadyType.js.map +1 -0
- package/lib/common/type/FilterInputType.js +2 -2
- package/lib/common/type/FilterInputType.js.map +1 -0
- package/lib/common/type/SearchParameterType.js +2 -3
- package/lib/common/type/SearchParameterType.js.map +1 -0
- package/lib/common/utils/dateFormat.js +2 -58
- package/lib/common/utils/dateFormat.js.map +1 -0
- package/lib/common/utils/filter.js +2 -99
- package/lib/common/utils/filter.js.map +1 -0
- package/lib/common/utils/newFilter.js +2 -126
- package/lib/common/utils/newFilter.js.map +1 -0
- package/lib/common/utils/pagination.js +2 -9
- package/lib/common/utils/pagination.js.map +1 -0
- package/lib/common/utils/search.js +2 -14
- package/lib/common/utils/search.js.map +1 -0
- package/lib/common/utils/sort.js +2 -13
- package/lib/common/utils/sort.js.map +1 -0
- package/lib/config/AWSConfig.js +2 -9
- package/lib/config/AWSConfig.js.map +1 -0
- package/lib/config/DatabaseConfig.js +2 -36
- package/lib/config/DatabaseConfig.js.map +1 -0
- package/lib/config/TwilioConfig.js +2 -7
- package/lib/config/TwilioConfig.js.map +1 -0
- package/lib/controller/Common.d.ts +0 -1
- package/lib/controller/Common.d.ts.map +1 -1
- package/lib/controller/Common.js +2 -76
- package/lib/controller/Common.js.map +1 -0
- package/lib/controller/DatabaseFactoryCollection.js +2 -14
- package/lib/controller/DatabaseFactoryCollection.js.map +1 -0
- package/lib/controller/MainController.js +2 -174
- package/lib/controller/MainController.js.map +1 -0
- package/lib/controller/aws/HoopBuisnessHours.js +2 -408
- package/lib/controller/aws/HoopBuisnessHours.js.map +1 -0
- package/lib/controller/aws/HoopOperationsController.js +2 -86
- package/lib/controller/aws/HoopOperationsController.js.map +1 -0
- package/lib/controller/aws/HoopOverrideBranchesController.js +2 -40
- package/lib/controller/aws/HoopOverrideBranchesController.js.map +1 -0
- package/lib/controller/aws/HoopProfilesListController.js +2 -61
- package/lib/controller/aws/HoopProfilesListController.js.map +1 -0
- package/lib/controller/aws/PlaybackScreenrecordings.js +2 -63
- package/lib/controller/aws/PlaybackScreenrecordings.js.map +1 -0
- package/lib/controller/twilio/AgentActionsController.js +2 -177
- package/lib/controller/twilio/AgentActionsController.js.map +1 -0
- package/lib/controller/twilio/AgentScorecardController.js +2 -173
- package/lib/controller/twilio/AgentScorecardController.js.map +1 -0
- package/lib/controller/twilio/AuditLogController.js +2 -137
- package/lib/controller/twilio/AuditLogController.js.map +1 -0
- package/lib/controller/twilio/CallLogsController.js +2 -131
- package/lib/controller/twilio/CallLogsController.js.map +1 -0
- package/lib/controller/twilio/CallbackAndVoicemailController.js +2 -114
- package/lib/controller/twilio/CallbackAndVoicemailController.js.map +1 -0
- package/lib/controller/twilio/ChannelSettingTaskInfoController.js +2 -117
- package/lib/controller/twilio/ChannelSettingTaskInfoController.js.map +1 -0
- package/lib/controller/twilio/ChannelSettingsController.js +2 -142
- package/lib/controller/twilio/ChannelSettingsController.js.map +1 -0
- package/lib/controller/twilio/CxConfigAssetController.d.ts.map +1 -1
- package/lib/controller/twilio/CxConfigAssetController.js +2 -128
- package/lib/controller/twilio/CxConfigAssetController.js.map +1 -0
- package/lib/controller/twilio/CxConfigController.js +2 -112
- package/lib/controller/twilio/CxConfigController.js.map +1 -0
- package/lib/controller/twilio/CxConfigExternalNumbersController.js +2 -138
- package/lib/controller/twilio/CxConfigExternalNumbersController.js.map +1 -0
- package/lib/controller/twilio/CxConfigOther.js +2 -128
- package/lib/controller/twilio/CxConfigOther.js.map +1 -0
- package/lib/controller/twilio/CxConfigQueueMenuController.js +2 -129
- package/lib/controller/twilio/CxConfigQueueMenuController.js.map +1 -0
- package/lib/controller/twilio/CxConfigUIconfigController.js +2 -132
- package/lib/controller/twilio/CxConfigUIconfigController.js.map +1 -0
- package/lib/controller/twilio/GPMController.js +2 -151
- package/lib/controller/twilio/GPMController.js.map +1 -0
- package/lib/controller/twilio/HoopBusinessHoursController.js +2 -285
- package/lib/controller/twilio/HoopBusinessHoursController.js.map +1 -0
- package/lib/controller/twilio/HoopHolidaysController.js +2 -150
- package/lib/controller/twilio/HoopHolidaysController.js.map +1 -0
- package/lib/controller/twilio/HoopMainController.js +2 -297
- package/lib/controller/twilio/HoopMainController.js.map +1 -0
- package/lib/controller/twilio/HoopNotesController.js +2 -149
- package/lib/controller/twilio/HoopNotesController.js.map +1 -0
- package/lib/controller/twilio/HoopOperationsController.js +2 -138
- package/lib/controller/twilio/HoopOperationsController.js.map +1 -0
- package/lib/controller/twilio/HoopOverrideBranchesController.js +2 -137
- package/lib/controller/twilio/HoopOverrideBranchesController.js.map +1 -0
- package/lib/controller/twilio/HoopPartialDaysController.js +2 -150
- package/lib/controller/twilio/HoopPartialDaysController.js.map +1 -0
- package/lib/controller/twilio/HoopProfilesListController.js +2 -147
- package/lib/controller/twilio/HoopProfilesListController.js.map +1 -0
- package/lib/controller/twilio/NavigationController.js +2 -170
- package/lib/controller/twilio/NavigationController.js.map +1 -0
- package/lib/controller/twilio/QualityFormsController.js +2 -129
- package/lib/controller/twilio/QualityFormsController.js.map +1 -0
- package/lib/controller/twilio/QuickLinkController.js +2 -122
- package/lib/controller/twilio/QuickLinkController.js.map +1 -0
- package/lib/controller/twilio/RealTimeReportQueueDetailsController.js +2 -126
- package/lib/controller/twilio/RealTimeReportQueueDetailsController.js.map +1 -0
- package/lib/controller/twilio/RealTimeReportsWGDetailsController.js +2 -160
- package/lib/controller/twilio/RealTimeReportsWGDetailsController.js.map +1 -0
- package/lib/controller/twilio/TaskInfoPanelController.js +2 -134
- package/lib/controller/twilio/TaskInfoPanelController.js.map +1 -0
- package/lib/controller/twilio/filterImpl/AgentScorecardFilter.js +2 -52
- package/lib/controller/twilio/filterImpl/AgentScorecardFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/AuditLogsFilter.js +2 -89
- package/lib/controller/twilio/filterImpl/AuditLogsFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/CXConfigPromptFilter.js +2 -81
- package/lib/controller/twilio/filterImpl/CXConfigPromptFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/CallLogsFilter.js +2 -101
- package/lib/controller/twilio/filterImpl/CallLogsFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/CxConfigAssetFilter.js +2 -59
- package/lib/controller/twilio/filterImpl/CxConfigAssetFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/CxConfigExternalNumbersFilter.js +2 -67
- package/lib/controller/twilio/filterImpl/CxConfigExternalNumbersFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/CxConfigOtherFilter.js +2 -52
- package/lib/controller/twilio/filterImpl/CxConfigOtherFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/CxConfigQueueMenuFilter.js +2 -78
- package/lib/controller/twilio/filterImpl/CxConfigQueueMenuFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/CxConfigUIconfigFilter.js +2 -51
- package/lib/controller/twilio/filterImpl/CxConfigUIconfigFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/HoopHolidaysFilter.js +2 -55
- package/lib/controller/twilio/filterImpl/HoopHolidaysFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/HoopNotesFilter.js +2 -51
- package/lib/controller/twilio/filterImpl/HoopNotesFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/HoopPartialDaysFilter.js +2 -55
- package/lib/controller/twilio/filterImpl/HoopPartialDaysFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/MainFilterService.js +2 -108
- package/lib/controller/twilio/filterImpl/MainFilterService.js.map +1 -0
- package/lib/controller/twilio/filterImpl/NavigationFilter.js +2 -90
- package/lib/controller/twilio/filterImpl/NavigationFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/QueueDetailsFilter.js +2 -53
- package/lib/controller/twilio/filterImpl/QueueDetailsFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/TaskCompleteFilter.js +2 -62
- package/lib/controller/twilio/filterImpl/TaskCompleteFilter.js.map +1 -0
- package/lib/controller/twilio/filterImpl/TaskInfoPanelFilter.js +2 -52
- package/lib/controller/twilio/filterImpl/TaskInfoPanelFilter.js.map +1 -0
- package/lib/express/ApiResponse.js +2 -11
- package/lib/express/ApiResponse.js.map +1 -0
- package/lib/express/RequestValidator.js +2 -77
- package/lib/express/RequestValidator.js.map +1 -0
- package/lib/express/RequireParamsPicker.js +2 -14
- package/lib/express/RequireParamsPicker.js.map +1 -0
- package/lib/express/ValidateRequireParameters.js +2 -39
- package/lib/express/ValidateRequireParameters.js.map +1 -0
- package/lib/index.js +2 -100
- package/lib/index.js.map +1 -0
- package/lib/models/BatchUpdateSkills.model.js +2 -11
- package/lib/models/BatchUpdateSkills.model.js.map +1 -0
- package/lib/models/CannedMessage.model.js +2 -1
- package/lib/models/CannedMessage.model.js.map +1 -0
- package/lib/models/ChannelSettingsTaskInfo.model.js +2 -1
- package/lib/models/ChannelSettingsTaskInfo.model.js.map +1 -0
- package/lib/models/CustomerFeedback.model.js +2 -1
- package/lib/models/CustomerFeedback.model.js.map +1 -0
- package/lib/models/Filter.model.js +2 -2
- package/lib/models/Filter.model.js.map +1 -0
- package/lib/models/Hoop.model.js +2 -9
- package/lib/models/Hoop.model.js.map +1 -0
- package/lib/models/Navigation.model.js +2 -8
- package/lib/models/Navigation.model.js.map +1 -0
- package/lib/models/Roles.Model.js +2 -1
- package/lib/models/Roles.Model.js.map +1 -0
- package/lib/models/abstract/BaseModel.js +2 -40
- package/lib/models/abstract/BaseModel.js.map +1 -0
- package/lib/models/abstract/BaseModelOld.js +2 -13
- package/lib/models/abstract/BaseModelOld.js.map +1 -0
- package/lib/models/impl/AgentActionsLogsModel.js +2 -89
- package/lib/models/impl/AgentActionsLogsModel.js.map +1 -0
- package/lib/models/impl/AgentActionsModel.js +2 -60
- package/lib/models/impl/AgentActionsModel.js.map +1 -0
- package/lib/models/impl/AgentScorecardModel.js +2 -282
- package/lib/models/impl/AgentScorecardModel.js.map +1 -0
- package/lib/models/impl/AuditLogsModel.js +2 -146
- package/lib/models/impl/AuditLogsModel.js.map +1 -0
- package/lib/models/impl/CallLogsModel.js +2 -109
- package/lib/models/impl/CallLogsModel.js.map +1 -0
- package/lib/models/impl/CallStatisticsModel.js +2 -52
- package/lib/models/impl/CallStatisticsModel.js.map +1 -0
- package/lib/models/impl/CategoryDetailsModel.js +2 -44
- package/lib/models/impl/CategoryDetailsModel.js.map +1 -0
- package/lib/models/impl/MemberModel.js +2 -170
- package/lib/models/impl/MemberModel.js.map +1 -0
- package/lib/models/impl/ModelValidationError.js +2 -15
- package/lib/models/impl/ModelValidationError.js.map +1 -0
- package/lib/models/impl/NavigationModel.js +2 -126
- package/lib/models/impl/NavigationModel.js.map +1 -0
- package/lib/models/impl/PerformanceStatisticsModel.js +2 -129
- package/lib/models/impl/PerformanceStatisticsModel.js.map +1 -0
- package/lib/models/impl/PlaybackScreenrecordings.js +2 -133
- package/lib/models/impl/PlaybackScreenrecordings.js.map +1 -0
- package/lib/models/impl/ProfileModel.js +2 -102
- package/lib/models/impl/ProfileModel.js.map +1 -0
- package/lib/models/impl/QualityFormsModel.js +2 -150
- package/lib/models/impl/QualityFormsModel.js.map +1 -0
- package/lib/models/impl/QuestionDetailsModel.js +2 -173
- package/lib/models/impl/QuestionDetailsModel.js.map +1 -0
- package/lib/models/impl/QueueDetailsModel.js +2 -261
- package/lib/models/impl/QueueDetailsModel.js.map +1 -0
- package/lib/models/impl/QueueModel.js +2 -156
- package/lib/models/impl/QueueModel.js.map +1 -0
- package/lib/models/impl/QuickLinkModel.js +2 -122
- package/lib/models/impl/QuickLinkModel.js.map +1 -0
- package/lib/models/impl/StatisticsNumberDetailsModel.js +2 -72
- package/lib/models/impl/StatisticsNumberDetailsModel.js.map +1 -0
- package/lib/models/impl/StatisticsTimeDetailsModel.js +2 -72
- package/lib/models/impl/StatisticsTimeDetailsModel.js.map +1 -0
- package/lib/models/impl/TaskAttributesModel.js +2 -108
- package/lib/models/impl/TaskAttributesModel.js.map +1 -0
- package/lib/models/impl/TaskChannelModel.js +2 -69
- package/lib/models/impl/TaskChannelModel.js.map +1 -0
- package/lib/models/impl/TaskComplete.js +2 -1
- package/lib/models/impl/TaskComplete.js.map +1 -0
- package/lib/models/impl/TaskInfoPanelModel.js +2 -69
- package/lib/models/impl/TaskInfoPanelModel.js.map +1 -0
- package/lib/models/impl/TaskModel.js +2 -234
- package/lib/models/impl/TaskModel.js.map +1 -0
- package/lib/models/impl/WorkGroupDetailsModel.js +2 -281
- package/lib/models/impl/WorkGroupDetailsModel.js.map +1 -0
- package/lib/models/impl/callbackandvoicemail/CallbackAndVoicemailModel.js +2 -140
- package/lib/models/impl/callbackandvoicemail/CallbackAndVoicemailModel.js.map +1 -0
- package/lib/models/impl/callbackandvoicemail/CallbackAndVoicemailNamespace.js +2 -12
- package/lib/models/impl/callbackandvoicemail/CallbackAndVoicemailNamespace.js.map +1 -0
- package/lib/models/impl/callbackandvoicemail/CallbackModel.js +2 -82
- package/lib/models/impl/callbackandvoicemail/CallbackModel.js.map +1 -0
- package/lib/models/impl/callbackandvoicemail/VoicemailModel.js +2 -108
- package/lib/models/impl/callbackandvoicemail/VoicemailModel.js.map +1 -0
- package/lib/models/impl/channelsettings/ChannelSettingModel.js +2 -240
- package/lib/models/impl/channelsettings/ChannelSettingModel.js.map +1 -0
- package/lib/models/impl/channelsettings/ChannelSettingTaskInfoModel.js +2 -106
- package/lib/models/impl/channelsettings/ChannelSettingTaskInfoModel.js.map +1 -0
- package/lib/models/impl/channelsettings/TaskInfoAttributeModel.js +2 -80
- package/lib/models/impl/channelsettings/TaskInfoAttributeModel.js.map +1 -0
- package/lib/models/impl/channelsettings/TaskInfoModel.js +2 -52
- package/lib/models/impl/channelsettings/TaskInfoModel.js.map +1 -0
- package/lib/models/impl/cxconfig/CxConfigNamespace.js +2 -20
- package/lib/models/impl/cxconfig/CxConfigNamespace.js.map +1 -0
- package/lib/models/impl/cxconfig/CxConfigUIConfigModel.js +2 -103
- package/lib/models/impl/cxconfig/CxConfigUIConfigModel.js.map +1 -0
- package/lib/models/impl/cxconfig/CxConfiguratorConfigModel.js +2 -103
- package/lib/models/impl/cxconfig/CxConfiguratorConfigModel.js.map +1 -0
- package/lib/models/impl/cxconfig/CxConfiguratorExternalNumbersModel.js +2 -149
- package/lib/models/impl/cxconfig/CxConfiguratorExternalNumbersModel.js.map +1 -0
- package/lib/models/impl/cxconfig/CxConfiguratorGPMAssetModel.js +2 -179
- package/lib/models/impl/cxconfig/CxConfiguratorGPMAssetModel.js.map +1 -0
- package/lib/models/impl/cxconfig/CxConfiguratorGPMPromptModel.js +2 -213
- package/lib/models/impl/cxconfig/CxConfiguratorGPMPromptModel.js.map +1 -0
- package/lib/models/impl/cxconfig/CxConfiguratorOtherModel.js +2 -96
- package/lib/models/impl/cxconfig/CxConfiguratorOtherModel.js.map +1 -0
- package/lib/models/impl/cxconfig/CxConfiguratorQueueMenuModel.js +2 -128
- package/lib/models/impl/cxconfig/CxConfiguratorQueueMenuModel.js.map +1 -0
- package/lib/models/impl/hoop/HoopBusinessHoursModel.js +2 -122
- package/lib/models/impl/hoop/HoopBusinessHoursModel.js.map +1 -0
- package/lib/models/impl/hoop/HoopDescriptionModel.js +2 -64
- package/lib/models/impl/hoop/HoopDescriptionModel.js.map +1 -0
- package/lib/models/impl/hoop/HoopHolidaysImplModel.js +2 -118
- package/lib/models/impl/hoop/HoopHolidaysImplModel.js.map +1 -0
- package/lib/models/impl/hoop/HoopNotesImplModel.js +2 -117
- package/lib/models/impl/hoop/HoopNotesImplModel.js.map +1 -0
- package/lib/models/impl/hoop/HoopOperationsImplModel.js +2 -161
- package/lib/models/impl/hoop/HoopOperationsImplModel.js.map +1 -0
- package/lib/models/impl/hoop/HoopOverrideImplModel.js +2 -143
- package/lib/models/impl/hoop/HoopOverrideImplModel.js.map +1 -0
- package/lib/models/impl/hoop/HoopPartialDaysImplModel.js +2 -140
- package/lib/models/impl/hoop/HoopPartialDaysImplModel.js.map +1 -0
- package/lib/models/impl/hoop/HoopProfilesListImplModel.js +2 -104
- package/lib/models/impl/hoop/HoopProfilesListImplModel.js.map +1 -0
- package/lib/models/impl/hoop/HoopWeeklyTimingModel.js +2 -86
- package/lib/models/impl/hoop/HoopWeeklyTimingModel.js.map +1 -0
- package/lib/models/index.js +2 -53
- package/lib/models/index.js.map +1 -0
- package/lib/models/interface/IBaseModel.js +2 -2
- package/lib/models/interface/IBaseModel.js.map +1 -0
- package/lib/models/types/AgentScorecard.type.js +2 -7
- package/lib/models/types/AgentScorecard.type.js.map +1 -0
- package/lib/models/types/AuditLog.type.js +2 -10
- package/lib/models/types/AuditLog.type.js.map +1 -0
- package/lib/models/types/CallLog.type.js +2 -10
- package/lib/models/types/CallLog.type.js.map +1 -0
- package/lib/models/types/ChannelSetting.type.js +2 -11
- package/lib/models/types/ChannelSetting.type.js.map +1 -0
- package/lib/models/types/CxConfig.type.js +2 -43
- package/lib/models/types/CxConfig.type.js.map +1 -0
- package/lib/models/types/Hoop.type.js +2 -13
- package/lib/models/types/Hoop.type.js.map +1 -0
- package/lib/models/types/Navigation.type.js +2 -8
- package/lib/models/types/Navigation.type.js.map +1 -0
- package/lib/models/types/Profile.type.js +2 -2
- package/lib/models/types/Profile.type.js.map +1 -0
- package/lib/models/types/QueueDetails.type.js +2 -7
- package/lib/models/types/QueueDetails.type.js.map +1 -0
- package/lib/models/types/TaskComplete.type.js +2 -6
- package/lib/models/types/TaskComplete.type.js.map +1 -0
- package/lib/models/types/TaskInfoPanel.type.js +2 -7
- package/lib/models/types/TaskInfoPanel.type.js.map +1 -0
- package/lib/server.js +2 -39
- package/lib/server.js.map +1 -0
- package/lib/twilio/abstract/ServiceObjectStore.js +2 -10
- package/lib/twilio/abstract/ServiceObjectStore.js.map +1 -0
- package/lib/twilio/abstract/ServiceOpenRequest.js +2 -10
- package/lib/twilio/abstract/ServiceOpenRequest.js.map +1 -0
- package/lib/twilio/abstract/ServiceRequest.js +2 -7
- package/lib/twilio/abstract/ServiceRequest.js.map +1 -0
- package/lib/twilio/abstract/ServiceResource.js +2 -37
- package/lib/twilio/abstract/ServiceResource.js.map +1 -0
- package/lib/twilio/abstract/ServiceResourceFactory.js +2 -18
- package/lib/twilio/abstract/ServiceResourceFactory.js.map +1 -0
- package/lib/twilio/abstract/ServiceTransaction.js +2 -11
- package/lib/twilio/abstract/ServiceTransaction.js.map +1 -0
- package/lib/twilio/abstract/SyncServiceItemResource.js +2 -60
- package/lib/twilio/abstract/SyncServiceItemResource.js.map +1 -0
- package/lib/twilio/abstract/TwilioClientConfig.js +2 -1
- package/lib/twilio/abstract/TwilioClientConfig.js.map +1 -0
- package/lib/twilio/impl/TwilioAPIKeyConfig.js +2 -31
- package/lib/twilio/impl/TwilioAPIKeyConfig.js.map +1 -0
- package/lib/twilio/impl/TwilioAuthTokenConfig.js +2 -24
- package/lib/twilio/impl/TwilioAuthTokenConfig.js.map +1 -0
- package/lib/twilio/impl/TwilioClient.js +2 -21
- package/lib/twilio/impl/TwilioClient.js.map +1 -0
- package/lib/twilio/impl/message/messageService.js +2 -42
- package/lib/twilio/impl/message/messageService.js.map +1 -0
- package/lib/twilio/impl/sync/SyncDocument.js +2 -52
- package/lib/twilio/impl/sync/SyncDocument.js.map +1 -0
- package/lib/twilio/impl/sync/SyncDocumentTransaction.js +2 -31
- package/lib/twilio/impl/sync/SyncDocumentTransaction.js.map +1 -0
- package/lib/twilio/impl/sync/SyncList.js +2 -52
- package/lib/twilio/impl/sync/SyncList.js.map +1 -0
- package/lib/twilio/impl/sync/SyncListItem.js +2 -22
- package/lib/twilio/impl/sync/SyncListItem.js.map +1 -0
- package/lib/twilio/impl/sync/SyncListTransaction.js +2 -31
- package/lib/twilio/impl/sync/SyncListTransaction.js.map +1 -0
- package/lib/twilio/impl/sync/SyncMap.js +2 -139
- package/lib/twilio/impl/sync/SyncMap.js.map +1 -0
- package/lib/twilio/impl/sync/SyncMapItem.js +2 -7
- package/lib/twilio/impl/sync/SyncMapItem.js.map +1 -0
- package/lib/twilio/impl/sync/SyncMapTransaction.js +2 -38
- package/lib/twilio/impl/sync/SyncMapTransaction.js.map +1 -0
- package/lib/twilio/impl/sync/SyncOpenRequest.js +2 -24
- package/lib/twilio/impl/sync/SyncOpenRequest.js.map +1 -0
- package/lib/twilio/impl/sync/SyncRequest.js +2 -21
- package/lib/twilio/impl/sync/SyncRequest.js.map +1 -0
- package/lib/twilio/impl/sync/SyncResource.js +2 -97
- package/lib/twilio/impl/sync/SyncResource.js.map +1 -0
- package/lib/twilio/impl/sync/SyncServiceFactory.js +2 -117
- package/lib/twilio/impl/sync/SyncServiceFactory.js.map +1 -0
- package/lib/twilio/interface/IDirection.js +2 -2
- package/lib/twilio/interface/IDirection.js.map +1 -0
- package/lib/twilio/interface/ILink.js +2 -2
- package/lib/twilio/interface/ILink.js.map +1 -0
- package/lib/twilio/interface/IServiceDBOpenRequest.js +2 -2
- package/lib/twilio/interface/IServiceDBOpenRequest.js.map +1 -0
- package/lib/twilio/interface/IServiceObjectStore.js +2 -2
- package/lib/twilio/interface/IServiceObjectStore.js.map +1 -0
- package/lib/twilio/interface/IServiceObjectStoreParameters.js +2 -2
- package/lib/twilio/interface/IServiceObjectStoreParameters.js.map +1 -0
- package/lib/twilio/interface/IServiceRequest.js +2 -2
- package/lib/twilio/interface/IServiceRequest.js.map +1 -0
- package/lib/twilio/interface/IServiceResource.js +2 -2
- package/lib/twilio/interface/IServiceResource.js.map +1 -0
- package/lib/twilio/interface/IServiceTransation.js +2 -2
- package/lib/twilio/interface/IServiceTransation.js.map +1 -0
- package/lib/twilio/interface/ISubResourceUri.js +2 -2
- package/lib/twilio/interface/ISubResourceUri.js.map +1 -0
- package/lib/twilio/interface/ISyncItemData.js +2 -1
- package/lib/twilio/interface/ISyncItemData.js.map +1 -0
- package/lib/twilio/interface/ISyncObjectStoreParameters.js +2 -1
- package/lib/twilio/interface/ISyncObjectStoreParameters.js.map +1 -0
- package/lib/twilio/interface/ISyncTransactionOptions.js +2 -2
- package/lib/twilio/interface/ISyncTransactionOptions.js.map +1 -0
- package/package.json +10 -2
|
@@ -1,142 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
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.ChannelSettingsController = void 0;
|
|
13
|
-
const DatabaseConfig_1 = require("../../config/DatabaseConfig");
|
|
14
|
-
const ChannelSettingModel_1 = require("../../models/impl/channelsettings/ChannelSettingModel");
|
|
15
|
-
class ChannelSettingsController {
|
|
16
|
-
constructor(dbFactory) {
|
|
17
|
-
this._dbFactory = dbFactory;
|
|
18
|
-
}
|
|
19
|
-
getDatabaseConnection() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
22
|
-
return databaseConnection.result;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
getTransaction() {
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const database = yield this.getDatabaseConnection();
|
|
28
|
-
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.channelSettingsTable, "readwrite");
|
|
29
|
-
return dbTransaction;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
validateChannelSetting(channelSetting) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
const validationMessages = channelSetting.validationMessages;
|
|
35
|
-
if (validationMessages.length > 0) {
|
|
36
|
-
throw validationMessages;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
getMap() {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
try {
|
|
43
|
-
const dbTransaction = yield this.getTransaction();
|
|
44
|
-
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.channelSettingsTable);
|
|
45
|
-
const result = yield table.getMap();
|
|
46
|
-
const result2 = JSON.parse(JSON.stringify(result));
|
|
47
|
-
result2.etag = result2.revision;
|
|
48
|
-
return result2;
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
console.error("Error retrieving channel setting sync map:", error);
|
|
52
|
-
throw error;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
add(data) {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
try {
|
|
59
|
-
const channelSetting = new ChannelSettingModel_1.ChannelSettingModel(data.id, data.name, data.channelType, data.queueSid, data.autoAnswer, data.autoComplete, data.autoCallTranscript, data.autoCallRecording, data.autoCallScreenRecording, data.alert, data.waitMusic, data.createdBy, data.createdDate, data.updatedDate, data.waitMusicFile, data.alertAudioFile, data.autoAnswerTime, data.useAlertExistingAudio, data.autoCompleteTime, data.useWaitExistingAudio);
|
|
60
|
-
if (channelSetting.validationMessages.length > 0) {
|
|
61
|
-
throw channelSetting.validationMessages;
|
|
62
|
-
}
|
|
63
|
-
const dbTransaction = yield this.getTransaction();
|
|
64
|
-
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.channelSettingsTable);
|
|
65
|
-
const result = yield table.add(channelSetting.serialize, channelSetting.id);
|
|
66
|
-
return result;
|
|
67
|
-
}
|
|
68
|
-
catch (error) {
|
|
69
|
-
console.error("Error adding channel setting:", error);
|
|
70
|
-
throw error;
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
get(query) {
|
|
75
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
try {
|
|
77
|
-
const dbTransaction = yield this.getTransaction();
|
|
78
|
-
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.channelSettingsTable);
|
|
79
|
-
const result = yield table.get(query.id);
|
|
80
|
-
return result;
|
|
81
|
-
}
|
|
82
|
-
catch (error) {
|
|
83
|
-
console.error("Error retrieving channel setting:", error);
|
|
84
|
-
throw error;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
getAll(query) {
|
|
89
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
try {
|
|
91
|
-
const dbTransaction = yield this.getTransaction();
|
|
92
|
-
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.channelSettingsTable);
|
|
93
|
-
let result = yield table.getAll(query);
|
|
94
|
-
if (result.items && result.items.length) {
|
|
95
|
-
result.items = result.items.map((item) => {
|
|
96
|
-
return Object.assign({}, item);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
if (query.getFilterContent) {
|
|
100
|
-
query.allowedFields = ["name", "channelType", "queueSid"]; // Example allowed fields
|
|
101
|
-
result.filterContent = result.filter((item) => query.allowedFields.every((field) => field in item));
|
|
102
|
-
}
|
|
103
|
-
return { result, meta: query };
|
|
104
|
-
}
|
|
105
|
-
catch (error) {
|
|
106
|
-
console.error("Error retrieving all channel settings:", error);
|
|
107
|
-
throw error;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
edit(data) {
|
|
112
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
-
try {
|
|
114
|
-
const channelSetting = new ChannelSettingModel_1.ChannelSettingModel(data.id, data.name, data.channelType, data.queueSid, data.autoAnswer, data.autoComplete, data.autoCallTranscript, data.autoCallRecording, data.autoCallScreenRecording, data.alert, data.waitMusic, data.createdBy, data.createdDate, data.updatedDate, data.waitMusicFile, data.alertAudioFile, data.autoAnswerTime, data.useAlertExistingAudio, data.autoCompleteTime, data.useWaitExistingAudio);
|
|
115
|
-
yield this.validateChannelSetting(channelSetting);
|
|
116
|
-
const dbTransaction = yield this.getTransaction();
|
|
117
|
-
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.channelSettingsTable);
|
|
118
|
-
const result = yield table.put(channelSetting.serialize, channelSetting.id);
|
|
119
|
-
return result;
|
|
120
|
-
}
|
|
121
|
-
catch (error) {
|
|
122
|
-
console.error("Error editing channel setting:", error);
|
|
123
|
-
throw error;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
delete(query) {
|
|
128
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
try {
|
|
130
|
-
const dbTransaction = yield this.getTransaction();
|
|
131
|
-
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.channelSettingsTable);
|
|
132
|
-
const result = yield table.delete(query.id);
|
|
133
|
-
return result;
|
|
134
|
-
}
|
|
135
|
-
catch (error) {
|
|
136
|
-
console.error("Error deleting channel setting:", error);
|
|
137
|
-
throw error;
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
exports.ChannelSettingsController = ChannelSettingsController;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChannelSettingsController=void 0;const e=require("tslib"),t=require("../../config/DatabaseConfig"),i=require("../../models/impl/channelsettings/ChannelSettingModel");exports.ChannelSettingsController=class{constructor(e){this._dbFactory=e}getDatabaseConnection(){return e.__awaiter(this,void 0,void 0,(function*(){return(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result}))}getTransaction(){return e.__awaiter(this,void 0,void 0,(function*(){return(yield this.getDatabaseConnection()).transaction(t.databaseConfig.tables.channelSettingsTable,"readwrite")}))}validateChannelSetting(t){return e.__awaiter(this,void 0,void 0,(function*(){const e=t.validationMessages;if(e.length>0)throw e}))}getMap(){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=(yield this.getTransaction()).objectStore(t.databaseConfig.tables.channelSettingsTable),i=yield e.getMap(),n=JSON.parse(JSON.stringify(i));return n.etag=n.revision,n}catch(e){throw console.error("Error retrieving channel setting sync map:",e),e}}))}add(n){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=new i.ChannelSettingModel(n.id,n.name,n.channelType,n.queueSid,n.autoAnswer,n.autoComplete,n.autoCallTranscript,n.autoCallRecording,n.autoCallScreenRecording,n.alert,n.waitMusic,n.createdBy,n.createdDate,n.updatedDate,n.waitMusicFile,n.alertAudioFile,n.autoAnswerTime,n.useAlertExistingAudio,n.autoCompleteTime,n.useWaitExistingAudio);if(e.validationMessages.length>0)throw e.validationMessages;const a=(yield this.getTransaction()).objectStore(t.databaseConfig.tables.channelSettingsTable);return yield a.add(e.serialize,e.id)}catch(e){throw console.error("Error adding channel setting:",e),e}}))}get(i){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=(yield this.getTransaction()).objectStore(t.databaseConfig.tables.channelSettingsTable);return yield e.get(i.id)}catch(e){throw console.error("Error retrieving channel setting:",e),e}}))}getAll(i){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=(yield this.getTransaction()).objectStore(t.databaseConfig.tables.channelSettingsTable);let n=yield e.getAll(i);return n.items&&n.items.length&&(n.items=n.items.map((e=>Object.assign({},e)))),i.getFilterContent&&(i.allowedFields=["name","channelType","queueSid"],n.filterContent=n.filter((e=>i.allowedFields.every((t=>t in e))))),{result:n,meta:i}}catch(e){throw console.error("Error retrieving all channel settings:",e),e}}))}edit(n){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=new i.ChannelSettingModel(n.id,n.name,n.channelType,n.queueSid,n.autoAnswer,n.autoComplete,n.autoCallTranscript,n.autoCallRecording,n.autoCallScreenRecording,n.alert,n.waitMusic,n.createdBy,n.createdDate,n.updatedDate,n.waitMusicFile,n.alertAudioFile,n.autoAnswerTime,n.useAlertExistingAudio,n.autoCompleteTime,n.useWaitExistingAudio);yield this.validateChannelSetting(e);const a=(yield this.getTransaction()).objectStore(t.databaseConfig.tables.channelSettingsTable);return yield a.put(e.serialize,e.id)}catch(e){throw console.error("Error editing channel setting:",e),e}}))}delete(i){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=(yield this.getTransaction()).objectStore(t.databaseConfig.tables.channelSettingsTable);return yield e.delete(i.id)}catch(e){throw console.error("Error deleting channel setting:",e),e}}))}};
|
|
2
|
+
//# sourceMappingURL=ChannelSettingsController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChannelSettingsController.js","sources":["../../../../controller/twilio/ChannelSettingsController.ts"],"sourcesContent":[null],"names":["DatabaseConfig_1","require","ChannelSettingModel_1","exports","ChannelSettingsController","constructor","dbFactory","this","_dbFactory","getDatabaseConnection","asyncOpen","databaseConfig","databaseName","version","result","getTransaction","transaction","tables","channelSettingsTable","validateChannelSetting","channelSetting","validationMessages","length","getMap","table","objectStore","result2","JSON","parse","stringify","etag","revision","error","console","add","data","id","name","channelType","queueSid","autoAnswer","autoComplete","autoCallTranscript","autoCallRecording","autoCallScreenRecording","alert","waitMusic","createdBy","createdDate","updatedDate","waitMusicFile","alertAudioFile","autoAnswerTime","useAlertExistingAudio","autoCompleteTime","useWaitExistingAudio","serialize","get","query","getAll","items","map","item","Object","assign","getFilterContent","allowedFields","filterContent","filter","every","field","meta","edit","put","delete"],"mappings":"yHAG6DA,EAAAC,QAAA,+BAE+BC,EAAAD,QAAA,yDAE5FE,QA0KCC,0BA1KD,MAGI,WAAAC,CAAYC,GACRC,KAAKC,WAAaF,CACrB,CAEa,qBAAAG,sDAKV,aAJmDF,KAAKC,WAAWE,UAC/DV,EAAAW,eAAeC,aACfZ,iBAAea,UAEOC,SAC7B,CAEa,cAAAC,sDAGV,aAFuBR,KAAKE,yBACGO,YAAYhB,EAAAW,eAAeM,OAAOC,qBAAsB,eAE1F,CAEa,sBAAAC,CAAuBC,sDACjC,MAAMC,EAAqBD,EAAeC,mBAC1C,GAAIA,EAAmBC,OAAS,EAC5B,MAAMD,IAEb,CAEK,MAAAE,sDACF,IACI,MACMC,SADsBjB,KAAKQ,kBACLU,YAAYzB,EAAcW,eAACM,OAAOC,sBACxDJ,QAAoBU,EAAMD,SAC1BG,EAAUC,KAAKC,MAAMD,KAAKE,UAAUf,IAE1C,OADAY,EAAQI,KAAOJ,EAAQK,SAChBL,CACV,CAAC,MAAOM,GAEL,MADAC,QAAQD,MAAM,6CAA8CA,GACtDA,CACT,IACJ,CAEK,GAAAE,CAAIC,sDACN,IACI,MAAMf,EAAiB,IAAIlB,sBACvBiC,EAAKC,GACLD,EAAKE,KACLF,EAAKG,YACLH,EAAKI,SACLJ,EAAKK,WACLL,EAAKM,aACLN,EAAKO,m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iC,EAAKC,GACLD,EAAKE,KACLF,EAAKG,YACLH,EAAKI,SACLJ,EAAKK,WACLL,EAAKM,aACLN,EAAKO,mBACLP,EAAKQ,kBACLR,EAAKS,wBACLT,EAAKU,MACLV,EAAKW,UACLX,EAAKY,UACLZ,EAAKa,YACLb,EAAKc,YACLd,EAAKe,cACLf,EAAKgB,eACLhB,EAAKiB,eACLjB,EAAKkB,sBACLlB,EAAKmB,iBACLnB,EAAKoB,4BAGHhD,KAAKY,uBAAuBC,GAElC,MACMI,SADsBjB,KAAKQ,kBACLU,YAAYzB,EAAcW,eAACM,OAAOC,sBAE9D,aADqBM,EAAMiD,IAAIrD,EAAeoC,UAAWpC,EAAegB,GAG3E,CAAC,MAAOJ,GAEL,MADAC,QAAQD,MAAM,iCAAkCA,GAC1CA,CACT,IACJ,CAEK,OAAO0B,sDACT,IACI,MACMlC,SADsBjB,KAAKQ,kBACLU,YAAYzB,EAAcW,eAACM,OAAOC,sBAE9D,aADqBM,EAAMkD,OAAOhB,EAAMtB,GAE3C,CAAC,MAAOJ,GAEL,MADAC,QAAQD,MAAM,kCAAmCA,GAC3CA,CACT,IACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CxConfigAssetController.d.ts","sourceRoot":"","sources":["../../../controller/twilio/CxConfigAssetController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAI/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,wDAAwD,CAAC;
|
|
1
|
+
{"version":3,"file":"CxConfigAssetController.d.ts","sourceRoot":"","sources":["../../../controller/twilio/CxConfigAssetController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAI/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAE5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,wDAAwD,CAAC;AAGrG,qBAAa,uBAAuB;IAClC,OAAO,CAAC,UAAU,CAAqB;gBAC3B,SAAS,EAAE,kBAAkB;IAKnC,GAAG,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,GAAG,CAAC;IAiCpD,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,2BAA2B,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAyBjE,MAAM,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC;IA0ChD,IAAI,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,GAAG,CAAC;IA6BrD,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,2BAA2B,EAAE,IAAI,CAAC;CAuB5D"}
|
|
@@ -1,128 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
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.CxConfigAssetController = void 0;
|
|
13
|
-
const DatabaseConfig_1 = require("../../config/DatabaseConfig");
|
|
14
|
-
const CxConfiguratorGPMAssetModel_1 = require("../../models/impl/cxconfig/CxConfiguratorGPMAssetModel");
|
|
15
|
-
const CxConfigAssetFilter_1 = require("./filterImpl/CxConfigAssetFilter");
|
|
16
|
-
class CxConfigAssetController {
|
|
17
|
-
constructor(dbFactory) {
|
|
18
|
-
this._dbFactory = dbFactory;
|
|
19
|
-
}
|
|
20
|
-
add(data) {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
try {
|
|
23
|
-
const gpmasset = new CxConfiguratorGPMAssetModel_1.CxConfiguratorGPMAssetModel(data.id, data.name, data.value, data.type, data.description, data.createdAt, data.updatedAt);
|
|
24
|
-
if (gpmasset.validationMessages.length > 0) {
|
|
25
|
-
throw gpmasset.validationMessages;
|
|
26
|
-
}
|
|
27
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
28
|
-
const database = databaseConnection.result;
|
|
29
|
-
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.cxConfigAssetTable, "readwrite");
|
|
30
|
-
let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigAssetTable);
|
|
31
|
-
let result = yield table.add(gpmasset.serialize, gpmasset.id);
|
|
32
|
-
return result;
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
console.log("error occrred", error);
|
|
36
|
-
throw error;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
get(query) {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
try {
|
|
43
|
-
console.log(query);
|
|
44
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
45
|
-
const database = databaseConnection.result;
|
|
46
|
-
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.cxConfigAssetTable, "readwrite");
|
|
47
|
-
let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigAssetTable);
|
|
48
|
-
let result = yield table.get(query.id);
|
|
49
|
-
return result;
|
|
50
|
-
}
|
|
51
|
-
catch (error) {
|
|
52
|
-
console.log("error ", error);
|
|
53
|
-
return error;
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
//Get GPM Messages
|
|
58
|
-
getAll(query) {
|
|
59
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
try {
|
|
61
|
-
console.log(query);
|
|
62
|
-
// changed to Specfic factory as method override is not working
|
|
63
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
64
|
-
const database = databaseConnection.result;
|
|
65
|
-
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.cxConfigAssetTable, "readwrite");
|
|
66
|
-
let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigAssetTable);
|
|
67
|
-
const allowedFields = [
|
|
68
|
-
"type"
|
|
69
|
-
];
|
|
70
|
-
if (query.getFilterContent) {
|
|
71
|
-
query.allowedFields = allowedFields;
|
|
72
|
-
}
|
|
73
|
-
query.category = "CXConfig-Asset";
|
|
74
|
-
let result = yield table.getAll(query);
|
|
75
|
-
if (query.getFilterContent) {
|
|
76
|
-
result.filterContent = CxConfigAssetFilter_1.CXConfigAssetFilterService.getFilterData(result.filterOptions);
|
|
77
|
-
}
|
|
78
|
-
if ("filterOptions" in result) {
|
|
79
|
-
delete result.filterOptions;
|
|
80
|
-
}
|
|
81
|
-
return { result, meta: query };
|
|
82
|
-
}
|
|
83
|
-
catch (error) {
|
|
84
|
-
console.log("error ", error);
|
|
85
|
-
return error;
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
edit(data) {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
try {
|
|
92
|
-
const gpmasset = new CxConfiguratorGPMAssetModel_1.CxConfiguratorGPMAssetModel(data.id, data.name, data.value, data.type, data.description, data.createdAt, data.updatedAt);
|
|
93
|
-
if (gpmasset.validationMessages.length > 0) {
|
|
94
|
-
throw gpmasset.validationMessages;
|
|
95
|
-
}
|
|
96
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
97
|
-
const database = databaseConnection.result;
|
|
98
|
-
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.cxConfigAssetTable, "readwrite");
|
|
99
|
-
let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigAssetTable);
|
|
100
|
-
const key = gpmasset.id;
|
|
101
|
-
let result = yield table.put(gpmasset.serialize, key);
|
|
102
|
-
return result;
|
|
103
|
-
}
|
|
104
|
-
catch (error) {
|
|
105
|
-
console.log("error ", error);
|
|
106
|
-
return error;
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
delete(query) {
|
|
111
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
-
try {
|
|
113
|
-
// const DataValidation = new CxConfiguratorGPMPrompt(query)
|
|
114
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
115
|
-
const database = databaseConnection.result;
|
|
116
|
-
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.cxConfigAssetTable, "readwrite");
|
|
117
|
-
let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigAssetTable);
|
|
118
|
-
let result = yield table.delete(query.id);
|
|
119
|
-
return result;
|
|
120
|
-
}
|
|
121
|
-
catch (error) {
|
|
122
|
-
console.log("delete record error ", error);
|
|
123
|
-
return error;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
exports.CxConfigAssetController = CxConfigAssetController;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.CxConfigAssetController=void 0;const e=require("tslib"),t=require("../../config/DatabaseConfig"),a=require("../../models/impl/cxconfig/CxConfiguratorGPMAssetModel"),o=require("./filterImpl/CxConfigAssetFilter");exports.CxConfigAssetController=class{constructor(e){this._dbFactory=e}add(o){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=new a.CxConfiguratorGPMAssetModel(o.id,o.name,o.value,o.type,o.description,o.createdAt,o.updatedAt);if(e.validationMessages.length>0)throw e.validationMessages;const s=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;let i=s.transaction(t.databaseConfig.tables.cxConfigAssetTable,"readwrite").objectStore(t.databaseConfig.tables.cxConfigAssetTable);return yield i.add(e.serialize,e.id)}catch(e){throw console.log("error occrred",e),e}}))}get(a){return e.__awaiter(this,void 0,void 0,(function*(){try{console.log(a);const e=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;let o=e.transaction(t.databaseConfig.tables.cxConfigAssetTable,"readwrite").objectStore(t.databaseConfig.tables.cxConfigAssetTable);return yield o.get(a.id)}catch(e){return console.log("error ",e),e}}))}getAll(a){return e.__awaiter(this,void 0,void 0,(function*(){try{console.log(a);const e=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;let s=e.transaction(t.databaseConfig.tables.cxConfigAssetTable,"readwrite").objectStore(t.databaseConfig.tables.cxConfigAssetTable);const i=["type"];a.getFilterContent&&(a.allowedFields=i),a.category="CXConfig-Asset";let r=yield s.getAll(a);return a.getFilterContent&&(r.filterContent=o.CXConfigAssetFilterService.getFilterData(r.filterOptions)),"filterOptions"in r&&delete r.filterOptions,{result:r,meta:a}}catch(e){return console.log("error ",e),e}}))}edit(o){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=new a.CxConfiguratorGPMAssetModel(o.id,o.name,o.value,o.type,o.description,o.createdAt,o.updatedAt);if(e.validationMessages.length>0)throw e.validationMessages;const s=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;let i=s.transaction(t.databaseConfig.tables.cxConfigAssetTable,"readwrite").objectStore(t.databaseConfig.tables.cxConfigAssetTable);const r=e.id;return yield i.put(e.serialize,r)}catch(e){return console.log("error ",e),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;let o=e.transaction(t.databaseConfig.tables.cxConfigAssetTable,"readwrite").objectStore(t.databaseConfig.tables.cxConfigAssetTable);return yield o.delete(a.id)}catch(e){return console.log("delete record error ",e),e}}))}};
|
|
2
|
+
//# sourceMappingURL=CxConfigAssetController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CxConfigAssetController.js","sources":["../../../../controller/twilio/CxConfigAssetController.ts"],"sourcesContent":[null],"names":["DatabaseConfig_1","require","CxConfiguratorGPMAssetModel_1","CxConfigAssetFilter_1","exports","CxConfigAssetController","constructor","dbFactory","this","_dbFactory","add","data","gpmasset","CxConfiguratorGPMAssetModel","id","name","value","type","description","createdAt","updatedAt","validationMessages","length","database","asyncOpen","databaseConfig","databaseName","version","result","table","transaction","tables","cxConfigAssetTable","objectStore","serialize","error","console","log","get","query","getAll","allowedFields","getFilterContent","category","filterContent","CXConfigAssetFilterService","getFilterData","filterOptions","meta","edit","key","put","delete"],"mappings":"uHAG6DA,EAAAC,QAAA,+BAGwCC,EAAAD,QAAA,0DACxBE,EAAAF,QAAA,oCAE7EG,QA+JCC,wBA/JD,MAEE,WAAAC,CAAYC,GACVC,KAAKC,WAAaF,CACnB,CAGK,GAAAG,CAAIC,sDACR,IACE,MAAMC,EAAW,IAAIV,EAAAW,4BACnBF,EAAKG,GAAIH,EAAKI,KAAMJ,EAAKK,MAAOL,EAAKM,KACrCN,EAAKO,YAAaP,EAAKQ,UAAWR,EAAKS,WAIzC,GAAIR,EAASS,mBAAmBC,OAAS,EACvC,MAAMV,EAASS,mBAGjB,MAKME,SAJEf,KAAKC,WAAWe,UACpBxB,EAAAyB,eAAeC,aACf1B,iBAAe2B,UAEiBC,OAKpC,IAAIC,EAJkBN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,EAAKK,MAAOL,EAAKM,KAAMN,EAAKO,YAAaP,EAAKQ,UAAWR,EAAKS,WACnI,GAAIR,EAASS,mBAAmBC,OAAS,EACvC,MAAMV,EAASS,mBAEjB,MAKME,SAJEf,KAAKC,WAAWe,UACpBxB,EAAAyB,eAAeC,aACf1B,iBAAe2B,UAEiBC,OAKpC,IAAIC,EAJkBN,EAASO,YAC7B9B,EAAAyB,eAAeM,OAAOC,mBACtB,aAEwBC,YACxBjC,EAAcyB,eAACM,OAAOC,oBAExB,MAAMkB,EAAMtC,EAASE,GAErB,aADmBe,EAAMsB,IAAIvC,EAASsB,UAAWgB,EAElD,CAAC,MAAOf,GAEP,OADAC,QAAQC,IAAI,SAAUF,GACfA,CACR,IACF,CAGK,OAAOI,sDACX,IAEE,MAKMhB,SAJEf,KAAKC,WAAWe,UACpBxB,EAAAyB,eAAeC,aACf1B,iBAAe2B,UAEiBC,OAKpC,IAAIC,EAJkBN,EAASO,YAC7B9B,EAAAyB,eAAeM,OAAOC,mBACtB,aAEwBC,YACxBjC,EAAcyB,eAACM,OAAOC,oBAGxB,aADmBH,EAAMuB,OAAOb,EAAMzB,GAEvC,CAAC,MAAOqB,GAEP,OADAC,QAAQC,IAAI,uBAAwBF,GAC7BA,CACR,IACF"}
|
|
@@ -1,112 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
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.CxConfigController = void 0;
|
|
13
|
-
const DatabaseConfig_1 = require("../../config/DatabaseConfig");
|
|
14
|
-
const CxConfiguratorConfigModel_1 = require("../../models/impl/cxconfig/CxConfiguratorConfigModel");
|
|
15
|
-
class CxConfigController {
|
|
16
|
-
constructor(dbFactory) {
|
|
17
|
-
this._dbFactory = dbFactory;
|
|
18
|
-
}
|
|
19
|
-
getDatabaseConnection() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
22
|
-
return databaseConnection.result;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
getTransaction(tableName) {
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const database = yield this.getDatabaseConnection();
|
|
28
|
-
const dbTransaction = database.transaction(tableName, "readwrite");
|
|
29
|
-
return dbTransaction;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
add(data) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
try {
|
|
35
|
-
const cxConfig = new CxConfiguratorConfigModel_1.CxConfiguratorConfigModel(data.id, data.name, data.value, data.description, data.createdAt, data.updatedAt);
|
|
36
|
-
if (cxConfig.validationMessages.length > 0) {
|
|
37
|
-
throw cxConfig.validationMessages;
|
|
38
|
-
}
|
|
39
|
-
const dbTransaction = yield this.getTransaction(DatabaseConfig_1.databaseConfig.tables.cxConfigTable);
|
|
40
|
-
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigTable);
|
|
41
|
-
const result = yield table.add(cxConfig.serialize, cxConfig.id);
|
|
42
|
-
return result;
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
console.error("Error occurred during add operation:", error);
|
|
46
|
-
throw error;
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
get(query) {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
try {
|
|
53
|
-
const dbTransaction = yield this.getTransaction(DatabaseConfig_1.databaseConfig.tables.cxConfigTable);
|
|
54
|
-
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigTable);
|
|
55
|
-
const result = yield table.get(query.id);
|
|
56
|
-
return result;
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
console.error("Error occurred during get operation:", error);
|
|
60
|
-
return error;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
getAll(query) {
|
|
65
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
try {
|
|
67
|
-
const dbTransaction = yield this.getTransaction(DatabaseConfig_1.databaseConfig.tables.cxConfigTable);
|
|
68
|
-
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigTable);
|
|
69
|
-
const result = yield table.getAll(query);
|
|
70
|
-
return { result, meta: query };
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
console.error("Error occurred during getAll operation:", error);
|
|
74
|
-
return error;
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
edit(data) {
|
|
79
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
try {
|
|
81
|
-
const cxConfig = new CxConfiguratorConfigModel_1.CxConfiguratorConfigModel(data.id, data.name, data.value, data.description, data.createdAt, data.updatedAt);
|
|
82
|
-
if (cxConfig.validationMessages.length > 0) {
|
|
83
|
-
throw cxConfig.validationMessages;
|
|
84
|
-
}
|
|
85
|
-
const dbTransaction = yield this.getTransaction(DatabaseConfig_1.databaseConfig.tables.cxConfigTable);
|
|
86
|
-
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigTable);
|
|
87
|
-
const key = cxConfig.id;
|
|
88
|
-
const result = yield table.put(cxConfig.serialize, key);
|
|
89
|
-
return result;
|
|
90
|
-
}
|
|
91
|
-
catch (error) {
|
|
92
|
-
console.error("Error occurred during edit operation:", error);
|
|
93
|
-
return error;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
delete(query) {
|
|
98
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
try {
|
|
100
|
-
const dbTransaction = yield this.getTransaction(DatabaseConfig_1.databaseConfig.tables.cxConfigTable);
|
|
101
|
-
const table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigTable);
|
|
102
|
-
const result = yield table.delete(query.id);
|
|
103
|
-
return result;
|
|
104
|
-
}
|
|
105
|
-
catch (error) {
|
|
106
|
-
console.error("Error occurred during delete operation:", error);
|
|
107
|
-
return error;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
exports.CxConfigController = CxConfigController;
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.CxConfigController=void 0;const e=require("tslib"),t=require("../../config/DatabaseConfig"),o=require("../../models/impl/cxconfig/CxConfiguratorConfigModel");exports.CxConfigController=class{constructor(e){this._dbFactory=e}getDatabaseConnection(){return e.__awaiter(this,void 0,void 0,(function*(){return(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result}))}getTransaction(t){return e.__awaiter(this,void 0,void 0,(function*(){return(yield this.getDatabaseConnection()).transaction(t,"readwrite")}))}add(r){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=new o.CxConfiguratorConfigModel(r.id,r.name,r.value,r.description,r.createdAt,r.updatedAt);if(e.validationMessages.length>0)throw e.validationMessages;const a=(yield this.getTransaction(t.databaseConfig.tables.cxConfigTable)).objectStore(t.databaseConfig.tables.cxConfigTable);return yield a.add(e.serialize,e.id)}catch(e){throw console.error("Error occurred during add operation:",e),e}}))}get(o){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=(yield this.getTransaction(t.databaseConfig.tables.cxConfigTable)).objectStore(t.databaseConfig.tables.cxConfigTable);return yield e.get(o.id)}catch(e){return console.error("Error occurred during get operation:",e),e}}))}getAll(o){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=(yield this.getTransaction(t.databaseConfig.tables.cxConfigTable)).objectStore(t.databaseConfig.tables.cxConfigTable);return{result:yield e.getAll(o),meta:o}}catch(e){return console.error("Error occurred during getAll operation:",e),e}}))}edit(r){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=new o.CxConfiguratorConfigModel(r.id,r.name,r.value,r.description,r.createdAt,r.updatedAt);if(e.validationMessages.length>0)throw e.validationMessages;const a=(yield this.getTransaction(t.databaseConfig.tables.cxConfigTable)).objectStore(t.databaseConfig.tables.cxConfigTable),i=e.id;return yield a.put(e.serialize,i)}catch(e){return console.error("Error occurred during edit operation:",e),e}}))}delete(o){return e.__awaiter(this,void 0,void 0,(function*(){try{const e=(yield this.getTransaction(t.databaseConfig.tables.cxConfigTable)).objectStore(t.databaseConfig.tables.cxConfigTable);return yield e.delete(o.id)}catch(e){return console.error("Error occurred during delete operation:",e),e}}))}};
|
|
2
|
+
//# sourceMappingURL=CxConfigController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CxConfigController.js","sources":["../../../../controller/twilio/CxConfigController.ts"],"sourcesContent":[null],"names":["DatabaseConfig_1","require","CxConfiguratorConfigModel_1","exports","CxConfigController","constructor","dbFactory","this","_dbFactory","getDatabaseConnection","asyncOpen","databaseConfig","databaseName","version","result","getTransaction","tableName","transaction","add","data","cxConfig","CxConfiguratorConfigModel","id","name","value","description","createdAt","updatedAt","validationMessages","length","table","tables","cxConfigTable","objectStore","serialize","error","console","get","query","getAll","meta","edit","key","put","delete"],"mappings":"kHAG6DA,EAAAC,QAAA,+BACoCC,EAAAD,QAAA,wDAGjGE,QAoGCC,mBApGD,MAGE,WAAAC,CAAYC,GACVC,KAAKC,WAAaF,CACnB,CAEa,qBAAAG,sDAKZ,aA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mBAAmBC,OAAS,EACvC,MAAMT,EAASQ,mBAGjB,MACME,SADsBvB,KAAKQ,eAAef,EAAAW,eAAeoB,OAAOC,gBAC1CC,YAAYjC,EAAcW,eAACoB,OAAOC,eACxDU,EAAMtB,EAASE,GAErB,aADqBQ,EAAMa,IAAIvB,EAASc,UAAWQ,EAEpD,CAAC,MAAOP,GAEP,OADAC,QAAQD,MAAM,wCAAyCA,GAChDA,CACR,IACF,CAEK,OAAOG,sDACX,IACE,MACMR,SADsBvB,KAAKQ,eAAef,EAAAW,eAAeoB,OAAOC,gBAC1CC,YAAYjC,EAAcW,eAACoB,OAAOC,eAE9D,aADqBF,EAAMc,OAAON,EAAMhB,GAEzC,CAAC,MAAOa,GAEP,OADAC,QAAQD,MAAM,0CAA2CA,GAClDA,CACR,IACF"}
|
|
@@ -1,138 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
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.CxConfigExternalNumbersController = void 0;
|
|
13
|
-
const DatabaseConfig_1 = require("../../config/DatabaseConfig");
|
|
14
|
-
const CxConfiguratorExternalNumbersModel_1 = require("../../models/impl/cxconfig/CxConfiguratorExternalNumbersModel");
|
|
15
|
-
const CxConfigExternalNumbersFilter_1 = require("./filterImpl/CxConfigExternalNumbersFilter");
|
|
16
|
-
class CxConfigExternalNumbersController {
|
|
17
|
-
constructor(dbFactory) {
|
|
18
|
-
this._dbFactory = dbFactory;
|
|
19
|
-
}
|
|
20
|
-
// Accepts an object and initializes the model with its properties
|
|
21
|
-
add(data) {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
try {
|
|
24
|
-
const { id, name, phonenumber, type, createdAt, updatedAt } = data;
|
|
25
|
-
// Initialize the model with individual attributes
|
|
26
|
-
const externalNumber = new CxConfiguratorExternalNumbersModel_1.CxConfiguratorExternalNumbersModel(id, name, phonenumber, type, createdAt, updatedAt);
|
|
27
|
-
if (externalNumber.validationMessages.length > 0) {
|
|
28
|
-
throw externalNumber.validationMessages;
|
|
29
|
-
}
|
|
30
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
31
|
-
const database = databaseConnection.result;
|
|
32
|
-
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.cxConfigExternalNumbersTable, "readwrite");
|
|
33
|
-
let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigExternalNumbersTable);
|
|
34
|
-
let result = yield table.add(externalNumber.serialize, externalNumber.id);
|
|
35
|
-
return result;
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
console.log('error occurred', error);
|
|
39
|
-
throw error;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
get(query) {
|
|
44
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
try {
|
|
46
|
-
console.log(query);
|
|
47
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
48
|
-
const database = databaseConnection.result;
|
|
49
|
-
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.cxConfigExternalNumbersTable, "readwrite");
|
|
50
|
-
let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigExternalNumbersTable);
|
|
51
|
-
let result = yield table.get(query.id);
|
|
52
|
-
return result;
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
console.log('error ', error);
|
|
56
|
-
return error;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
getAll(query) {
|
|
61
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
try {
|
|
63
|
-
console.log(query);
|
|
64
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
65
|
-
const database = databaseConnection.result;
|
|
66
|
-
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.cxConfigExternalNumbersTable, "readwrite");
|
|
67
|
-
let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigExternalNumbersTable);
|
|
68
|
-
const allowedFields = ["phonenumber", "type"];
|
|
69
|
-
if (query.getFilterContent) {
|
|
70
|
-
query.allowedFields = allowedFields;
|
|
71
|
-
}
|
|
72
|
-
query.category = "CXConfig-ExternalNumbers";
|
|
73
|
-
let result = yield table.getAll(query);
|
|
74
|
-
if (query.getFilterContent) {
|
|
75
|
-
result.filterContent = CxConfigExternalNumbersFilter_1.CXConfigExternalNumbersFilterService.getFilterData(result.filterOptions);
|
|
76
|
-
}
|
|
77
|
-
if (query.getPromptForIVR) {
|
|
78
|
-
result.items = transformArrayToJson(result.items);
|
|
79
|
-
}
|
|
80
|
-
if ("filterOptions" in result) {
|
|
81
|
-
delete result.filterOptions;
|
|
82
|
-
}
|
|
83
|
-
return { result, meta: query };
|
|
84
|
-
}
|
|
85
|
-
catch (error) {
|
|
86
|
-
console.log('error ', error);
|
|
87
|
-
return error;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
edit(data) {
|
|
92
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
try {
|
|
94
|
-
const { id, name, phonenumber, type, createdAt, updatedAt } = data;
|
|
95
|
-
// Initialize the model with individual attributes
|
|
96
|
-
const externalNumber = new CxConfiguratorExternalNumbersModel_1.CxConfiguratorExternalNumbersModel(id, name, phonenumber, type, createdAt, updatedAt);
|
|
97
|
-
if (externalNumber.validationMessages.length > 0) {
|
|
98
|
-
throw externalNumber.validationMessages;
|
|
99
|
-
}
|
|
100
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
101
|
-
const database = databaseConnection.result;
|
|
102
|
-
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.cxConfigExternalNumbersTable, "readwrite");
|
|
103
|
-
let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigExternalNumbersTable);
|
|
104
|
-
const key = externalNumber.id;
|
|
105
|
-
let result = yield table.put(externalNumber.serialize, key);
|
|
106
|
-
return result;
|
|
107
|
-
}
|
|
108
|
-
catch (error) {
|
|
109
|
-
console.log('error ', error);
|
|
110
|
-
return error;
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
delete(query) {
|
|
115
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
-
try {
|
|
117
|
-
const databaseConnection = yield this._dbFactory.asyncOpen(DatabaseConfig_1.databaseConfig.databaseName, DatabaseConfig_1.databaseConfig.version);
|
|
118
|
-
const database = databaseConnection.result;
|
|
119
|
-
const dbTransaction = database.transaction(DatabaseConfig_1.databaseConfig.tables.cxConfigExternalNumbersTable, "readwrite");
|
|
120
|
-
let table = dbTransaction.objectStore(DatabaseConfig_1.databaseConfig.tables.cxConfigExternalNumbersTable);
|
|
121
|
-
let result = yield table.delete(query.id);
|
|
122
|
-
return result;
|
|
123
|
-
}
|
|
124
|
-
catch (error) {
|
|
125
|
-
console.log('delete record error ', error);
|
|
126
|
-
return error;
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
exports.CxConfigExternalNumbersController = CxConfigExternalNumbersController;
|
|
132
|
-
function transformArrayToJson(inputArray) {
|
|
133
|
-
return inputArray.reduce((acc, item) => {
|
|
134
|
-
const { name, phonenumber, updatedAt, type, id, createdAt } = item;
|
|
135
|
-
acc[name] = { phonenumber, type, id, createdAt, updatedAt };
|
|
136
|
-
return acc;
|
|
137
|
-
}, {});
|
|
138
|
-
}
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.CxConfigExternalNumbersController=void 0;const e=require("tslib"),t=require("../../config/DatabaseConfig"),a=require("../../models/impl/cxconfig/CxConfiguratorExternalNumbersModel"),r=require("./filterImpl/CxConfigExternalNumbersFilter");exports.CxConfigExternalNumbersController=class{constructor(e){this._dbFactory=e}add(r){return e.__awaiter(this,void 0,void 0,(function*(){try{const{id:e,name:n,phonenumber:o,type:i,createdAt:s,updatedAt:l}=r,d=new a.CxConfiguratorExternalNumbersModel(e,n,o,i,s,l);if(d.validationMessages.length>0)throw d.validationMessages;const b=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;let c=b.transaction(t.databaseConfig.tables.cxConfigExternalNumbersTable,"readwrite").objectStore(t.databaseConfig.tables.cxConfigExternalNumbersTable);return yield c.add(d.serialize,d.id)}catch(e){throw console.log("error occurred",e),e}}))}get(a){return e.__awaiter(this,void 0,void 0,(function*(){try{console.log(a);const e=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;let r=e.transaction(t.databaseConfig.tables.cxConfigExternalNumbersTable,"readwrite").objectStore(t.databaseConfig.tables.cxConfigExternalNumbersTable);return yield r.get(a.id)}catch(e){return console.log("error ",e),e}}))}getAll(a){return e.__awaiter(this,void 0,void 0,(function*(){try{console.log(a);const e=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;let n=e.transaction(t.databaseConfig.tables.cxConfigExternalNumbersTable,"readwrite").objectStore(t.databaseConfig.tables.cxConfigExternalNumbersTable);const o=["phonenumber","type"];a.getFilterContent&&(a.allowedFields=o),a.category="CXConfig-ExternalNumbers";let i=yield n.getAll(a);return a.getFilterContent&&(i.filterContent=r.CXConfigExternalNumbersFilterService.getFilterData(i.filterOptions)),a.getPromptForIVR&&(i.items=i.items.reduce(((e,t)=>{const{name:a,phonenumber:r,updatedAt:n,type:o,id:i,createdAt:s}=t;return e[a]={phonenumber:r,type:o,id:i,createdAt:s,updatedAt:n},e}),{})),"filterOptions"in i&&delete i.filterOptions,{result:i,meta:a}}catch(e){return console.log("error ",e),e}}))}edit(r){return e.__awaiter(this,void 0,void 0,(function*(){try{const{id:e,name:n,phonenumber:o,type:i,createdAt:s,updatedAt:l}=r,d=new a.CxConfiguratorExternalNumbersModel(e,n,o,i,s,l);if(d.validationMessages.length>0)throw d.validationMessages;const b=(yield this._dbFactory.asyncOpen(t.databaseConfig.databaseName,t.databaseConfig.version)).result;let c=b.transaction(t.databaseConfig.tables.cxConfigExternalNumbersTable,"readwrite").objectStore(t.databaseConfig.tables.cxConfigExternalNumbersTable);const u=d.id;return yield c.put(d.serialize,u)}catch(e){return console.log("error ",e),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;let r=e.transaction(t.databaseConfig.tables.cxConfigExternalNumbersTable,"readwrite").objectStore(t.databaseConfig.tables.cxConfigExternalNumbersTable);return yield r.delete(a.id)}catch(e){return console.log("delete record error ",e),e}}))}};
|
|
2
|
+
//# sourceMappingURL=CxConfigExternalNumbersController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CxConfigExternalNumbersController.js","sources":["../../../../controller/twilio/CxConfigExternalNumbersController.ts"],"sourcesContent":[null],"names":["DatabaseConfig_1","require","CxConfiguratorExternalNumbersModel_1","CxConfigExternalNumbersFilter_1","exports","CxConfigExternalNumbersController","constructor","dbFactory","this","_dbFactory","add","data","id","name","phonenumber","type","createdAt","updatedAt","externalNumber","CxConfiguratorExternalNumbersModel","validationMessages","length","database","asyncOpen","databaseConfig","databaseName","version","result","table","transaction","tables","cxConfigExternalNumbersTable","objectStore","serialize","error","console","log","get","query","getAll","allowedFields","getFilterContent","category","filterContent","CXConfigExternalNumbersFilterService","getFilterData","filterOptions","getPromptForIVR","items","reduce","acc","item","meta","edit","key","put","delete"],"mappings":"iIAG6DA,EAAAC,QAAA,+BAEsDC,EAAAD,QAAA,iEACjBE,EAAAF,QAAA,8CAGlGG,QAqHCC,kCArHD,MAGI,WAAAC,CAAYC,GACRC,KAAKC,WAAaF,CACrB,CAGK,GAAAG,CAAIC,sDACN,IACI,MAAMC,GAAEA,EAAEC,KAAEA,EAAIC,YAAEA,EAAWC,KAAEA,EAAIC,UAAEA,EAASC,UAAEA,GAAcN,EAGxDO,EAAiB,IAAIhB,EAAkCiB,mCAACP,EAAIC,EAAMC,EAAaC,EAAMC,EAAWC,GACtG,GAAIC,EAAeE,mBAAmBC,OAAS,EAC3C,MAAMH,EAAeE,mBAGzB,MACME,SAD6Cd,KAAKC,WAAWc,UAAUvB,EAAAwB,eAAeC,aAAczB,iBAAe0B,UACrFC,OAEpC,IAAIC,EADkBN,EAASO,YAAY7B,EAAAwB,eAAeM,OAAOC,6BAA8B,aACrEC,YAAYhC,EAAcwB,eAACM,OAAOC,8BAE5D,aADmBH,EAAMlB,IAAIQ,EAAee,UAAWf,EAAeN,GAEzE,CACD,MAAOsB,GAEH,MADAC,QAAQC,IAAI,iBAAkBF,GACxBA,CACT,IACJ,CAEK,GAAAG,CAAIC,sDACN,IACIH,QAAQC,IAAIE,GACZ,MACMhB,SAD6Cd,KAAKC,WAAWc,UAAUvB,EAAAwB,eAAeC,aAAczB,iBAAe0B,UACrFC,OAEpC,IAAIC,EADkBN,EAASO,YAAY7B,EAAAwB,eAAeM,OAAOC,6BAA8B,aACrEC,YAAYhC,EAAcwB,eAACM,OAAOC,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