Built motion from commit (unavailable).|2.5.27
[motion2.git] / server / api / voiceExtension / voiceExtension.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x40cb=['events','../../mysqldb','VoiceExtension','setMaxListeners','save','emit','hasOwnProperty','hook','exports'];(function(_0x10f7ca,_0x2adf14){var _0x5256e3=function(_0x5b468f){while(--_0x5b468f){_0x10f7ca['push'](_0x10f7ca['shift']());}};_0x5256e3(++_0x2adf14);}(_0x40cb,0x105));var _0xb40c=function(_0x253e62,_0x53abaf){_0x253e62=_0x253e62-0x0;var _0x41da25=_0x40cb[_0x253e62];return _0x41da25;};'use strict';var EventEmitter=require(_0xb40c('0x0'));var VoiceExtension=require(_0xb40c('0x1'))['db'][_0xb40c('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xb40c('0x3')](0x0);var events={'afterCreate':_0xb40c('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x508710){return function(_0x5565e2,_0x51c13c,_0x48e373){VoiceExtensionEvents[_0xb40c('0x5')](_0x508710+':'+_0x5565e2['id'],_0x5565e2);VoiceExtensionEvents[_0xb40c('0x5')](_0x508710,_0x5565e2);_0x48e373(null);};}for(var e in events){if(events[_0xb40c('0x6')](e)){var event=events[e];VoiceExtension[_0xb40c('0x7')](e,emitEvent(event));}}module[_0xb40c('0x8')]=VoiceExtensionEvents;