c9fe29c5806268c2a25fe93de01fe9e71e9483bc
[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 _0x9d9d=['save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoicePrefix'];(function(_0x36eeff,_0x228d2f){var _0x4e1bc5=function(_0x4d8027){while(--_0x4d8027){_0x36eeff['push'](_0x36eeff['shift']());}};_0x4e1bc5(++_0x228d2f);}(_0x9d9d,0x1ab));var _0xd9d9=function(_0x22b23a,_0x236605){_0x22b23a=_0x22b23a-0x0;var _0x4a4a76=_0x9d9d[_0x22b23a];return _0x4a4a76;};'use strict';var EventEmitter=require(_0xd9d9('0x0'));var VoicePrefix=require(_0xd9d9('0x1'))['db'][_0xd9d9('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xd9d9('0x3'),'afterUpdate':_0xd9d9('0x4'),'afterDestroy':_0xd9d9('0x5')};function emitEvent(_0x2d23da){return function(_0x422a1b,_0x325ad7,_0x291e7c){VoicePrefixEvents[_0xd9d9('0x6')](_0x2d23da+':'+_0x422a1b['id'],_0x422a1b);VoicePrefixEvents['emit'](_0x2d23da,_0x422a1b);_0x291e7c(null);};}for(var e in events){if(events[_0xd9d9('0x7')](e)){var event=events[e];VoicePrefix[_0xd9d9('0x8')](e,emitEvent(event));}}module[_0xd9d9('0x9')]=VoicePrefixEvents;