1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0xd943=['../../mysqldb','VoiceExtension','setMaxListeners','update','remove','emit','events'];(function(_0x1b62c1,_0x3d5b59){var _0x2229c2=function(_0x4f9c86){while(--_0x4f9c86){_0x1b62c1['push'](_0x1b62c1['shift']());}};_0x2229c2(++_0x3d5b59);}(_0xd943,0x15d));var _0x3d94=function(_0x38cdf7,_0x46a2a0){_0x38cdf7=_0x38cdf7-0x0;var _0x51285a=_0xd943[_0x38cdf7];return _0x51285a;};'use strict';var EventEmitter=require(_0x3d94('0x0'));var VoiceExtension=require(_0x3d94('0x1'))['db'][_0x3d94('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x3d94('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x3d94('0x4'),'afterDestroy':_0x3d94('0x5')};function emitEvent(_0x38b5ca){return function(_0xc13b61,_0xaf8962,_0x5751f6){VoiceExtensionEvents['emit'](_0x38b5ca+':'+_0xc13b61['id'],_0xc13b61);VoiceExtensionEvents[_0x3d94('0x6')](_0x38b5ca,_0xc13b61);_0x5751f6(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;