Built motion from commit 0900f080.|2.5.45
[motion2.git] / server / api / voicePrefix / voicePrefix.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 _0xcb2d=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoicePrefix','setMaxListeners','save'];(function(_0xbf970c,_0x57b457){var _0xa74d9e=function(_0x7a6e9b){while(--_0x7a6e9b){_0xbf970c['push'](_0xbf970c['shift']());}};_0xa74d9e(++_0x57b457);}(_0xcb2d,0xd7));var _0xdcb2=function(_0x4d52c6,_0x398280){_0x4d52c6=_0x4d52c6-0x0;var _0x590ff1=_0xcb2d[_0x4d52c6];return _0x590ff1;};'use strict';var EventEmitter=require(_0xdcb2('0x0'));var VoicePrefix=require(_0xdcb2('0x1'))['db'][_0xdcb2('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xdcb2('0x3')](0x0);var events={'afterCreate':_0xdcb2('0x4'),'afterUpdate':_0xdcb2('0x5'),'afterDestroy':_0xdcb2('0x6')};function emitEvent(_0x47f29a){return function(_0x5bfbc6,_0x56120e,_0x39106c){VoicePrefixEvents[_0xdcb2('0x7')](_0x47f29a+':'+_0x5bfbc6['id'],_0x5bfbc6);VoicePrefixEvents[_0xdcb2('0x7')](_0x47f29a,_0x5bfbc6);_0x39106c(null);};}for(var e in events){if(events[_0xdcb2('0x8')](e)){var event=events[e];VoicePrefix[_0xdcb2('0x9')](e,emitEvent(event));}}module[_0xdcb2('0xa')]=VoicePrefixEvents;