Built motion from commit 1fa89557.|2.6.10
[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 _0xfc5b=['hook','exports','../../mysqldb','VoicePrefix','setMaxListeners','save','remove','emit','hasOwnProperty'];(function(_0x1deb03,_0xd05ad8){var _0x189fe7=function(_0x321225){while(--_0x321225){_0x1deb03['push'](_0x1deb03['shift']());}};_0x189fe7(++_0xd05ad8);}(_0xfc5b,0x80));var _0xbfc5=function(_0x54427b,_0x2bf982){_0x54427b=_0x54427b-0x0;var _0x557903=_0xfc5b[_0x54427b];return _0x557903;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0xbfc5('0x0'))['db'][_0xbfc5('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xbfc5('0x2')](0x0);var events={'afterCreate':_0xbfc5('0x3'),'afterUpdate':'update','afterDestroy':_0xbfc5('0x4')};function emitEvent(_0x23c97a){return function(_0x133479,_0x47b7b5,_0x15e10f){VoicePrefixEvents[_0xbfc5('0x5')](_0x23c97a+':'+_0x133479['id'],_0x133479);VoicePrefixEvents[_0xbfc5('0x5')](_0x23c97a,_0x133479);_0x15e10f(null);};}for(var e in events){if(events[_0xbfc5('0x6')](e)){var event=events[e];VoicePrefix[_0xbfc5('0x7')](e,emitEvent(event));}}module[_0xbfc5('0x8')]=VoicePrefixEvents;