Built motion from commit 67e5df37.|2.0.66
[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 _0x5c12=['../../mysqldb','VoicePrefix','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x364997,_0x3ce8bd){var _0x27e571=function(_0x433e6b){while(--_0x433e6b){_0x364997['push'](_0x364997['shift']());}};_0x27e571(++_0x3ce8bd);}(_0x5c12,0x188));var _0x25c1=function(_0x5f3f88,_0x562baf){_0x5f3f88=_0x5f3f88-0x0;var _0xd08119=_0x5c12[_0x5f3f88];return _0xd08119;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x25c1('0x0'))['db'][_0x25c1('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x25c1('0x2'),'afterUpdate':_0x25c1('0x3'),'afterDestroy':_0x25c1('0x4')};function emitEvent(_0x10f10c){return function(_0x2c5df0,_0x21ec20,_0x3f0f35){VoicePrefixEvents['emit'](_0x10f10c+':'+_0x2c5df0['id'],_0x2c5df0);VoicePrefixEvents[_0x25c1('0x5')](_0x10f10c,_0x2c5df0);_0x3f0f35(null);};}for(var e in events){if(events[_0x25c1('0x6')](e)){var event=events[e];VoicePrefix[_0x25c1('0x7')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;