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 _0x31d7=['emit','hasOwnProperty','hook','events','../../mysqldb','setMaxListeners','save','update'];(function(_0x424de8,_0x2fec82){var _0x496015=function(_0x44d81d){while(--_0x44d81d){_0x424de8['push'](_0x424de8['shift']());}};_0x496015(++_0x2fec82);}(_0x31d7,0xeb));var _0x731d=function(_0x15733e,_0x5848f7){_0x15733e=_0x15733e-0x0;var _0x12029f=_0x31d7[_0x15733e];return _0x12029f;};'use strict';var EventEmitter=require(_0x731d('0x0'));var VoiceExtension=require(_0x731d('0x1'))['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x731d('0x2')](0x0);var events={'afterCreate':_0x731d('0x3'),'afterUpdate':_0x731d('0x4'),'afterDestroy':'remove'};function emitEvent(_0x857a44){return function(_0xc9f130,_0xcf5959,_0x4f085c){VoiceExtensionEvents[_0x731d('0x5')](_0x857a44+':'+_0xc9f130['id'],_0xc9f130);VoiceExtensionEvents['emit'](_0x857a44,_0xc9f130);_0x4f085c(null);};}for(var e in events){if(events[_0x731d('0x6')](e)){var event=events[e];VoiceExtension[_0x731d('0x7')](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;