Built motion from commit (unavailable).|2.5.14
[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 _0x037d=['save','emit','hook','exports','events','VoiceExtension'];(function(_0x256823,_0x2392df){var _0x5db66b=function(_0x2bd5d6){while(--_0x2bd5d6){_0x256823['push'](_0x256823['shift']());}};_0x5db66b(++_0x2392df);}(_0x037d,0x1d8));var _0xd037=function(_0x46698a,_0x8de1e4){_0x46698a=_0x46698a-0x0;var _0x356db0=_0x037d[_0x46698a];return _0x356db0;};'use strict';var EventEmitter=require(_0xd037('0x0'));var VoiceExtension=require('../../mysqldb')['db'][_0xd037('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xd037('0x2'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x191ab9){return function(_0x5c92fe,_0x52214b,_0x121d38){VoiceExtensionEvents[_0xd037('0x3')](_0x191ab9+':'+_0x5c92fe['id'],_0x5c92fe);VoiceExtensionEvents[_0xd037('0x3')](_0x191ab9,_0x5c92fe);_0x121d38(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension[_0xd037('0x4')](e,emitEvent(event));}}module[_0xd037('0x5')]=VoiceExtensionEvents;