Built motion from commit 10af8726.|2.6.34
[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 _0x8fc4=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x2b9333,_0x3456fd){var _0x4895b5=function(_0x201102){while(--_0x201102){_0x2b9333['push'](_0x2b9333['shift']());}};_0x4895b5(++_0x3456fd);}(_0x8fc4,0xaa));var _0x48fc=function(_0x3495e5,_0x239806){_0x3495e5=_0x3495e5-0x0;var _0x332abf=_0x8fc4[_0x3495e5];return _0x332abf;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x48fc('0x0'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x48fc('0x1')](0x0);var events={'afterCreate':_0x48fc('0x2'),'afterUpdate':_0x48fc('0x3'),'afterDestroy':_0x48fc('0x4')};function emitEvent(_0x36debc){return function(_0x2bafc1,_0x1977b8,_0x2aa604){VoicePrefixEvents[_0x48fc('0x5')](_0x36debc+':'+_0x2bafc1['id'],_0x2bafc1);VoicePrefixEvents[_0x48fc('0x5')](_0x36debc,_0x2bafc1);_0x2aa604(null);};}for(var e in events){if(events[_0x48fc('0x6')](e)){var event=events[e];VoicePrefix[_0x48fc('0x7')](e,emitEvent(event));}}module[_0x48fc('0x8')]=VoicePrefixEvents;