Built motion from commit 497d3d92.|2.5.43
[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 _0x8555=['emit','hasOwnProperty','hook','events','../../mysqldb','setMaxListeners','save','update'];(function(_0x27d9a5,_0x4dbd46){var _0x11c5fd=function(_0x4baa29){while(--_0x4baa29){_0x27d9a5['push'](_0x27d9a5['shift']());}};_0x11c5fd(++_0x4dbd46);}(_0x8555,0xbb));var _0x5855=function(_0x512da5,_0x580907){_0x512da5=_0x512da5-0x0;var _0x466b24=_0x8555[_0x512da5];return _0x466b24;};'use strict';var EventEmitter=require(_0x5855('0x0'));var VoicePrefix=require(_0x5855('0x1'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x5855('0x2')](0x0);var events={'afterCreate':_0x5855('0x3'),'afterUpdate':_0x5855('0x4'),'afterDestroy':'remove'};function emitEvent(_0x3b0994){return function(_0x32310d,_0x13438b,_0x4f56d6){VoicePrefixEvents[_0x5855('0x5')](_0x3b0994+':'+_0x32310d['id'],_0x32310d);VoicePrefixEvents[_0x5855('0x5')](_0x3b0994,_0x32310d);_0x4f56d6(null);};}for(var e in events){if(events[_0x5855('0x6')](e)){var event=events[e];VoicePrefix[_0x5855('0x7')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;