Built motion from commit 0d14f64c.|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 _0x00a2=['save','remove','emit','hook','exports','../../mysqldb','setMaxListeners'];(function(_0x2be720,_0x4b5c86){var _0x53a4db=function(_0x214a65){while(--_0x214a65){_0x2be720['push'](_0x2be720['shift']());}};_0x53a4db(++_0x4b5c86);}(_0x00a2,0x1b0));var _0x200a=function(_0x457c78,_0x318d65){_0x457c78=_0x457c78-0x0;var _0x235cf5=_0x00a2[_0x457c78];return _0x235cf5;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x200a('0x0'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x200a('0x1')](0x0);var events={'afterCreate':_0x200a('0x2'),'afterUpdate':'update','afterDestroy':_0x200a('0x3')};function emitEvent(_0x4a6cf2){return function(_0x6295fa,_0x4a71e8,_0x3f4756){VoicePrefixEvents[_0x200a('0x4')](_0x4a6cf2+':'+_0x6295fa['id'],_0x6295fa);VoicePrefixEvents[_0x200a('0x4')](_0x4a6cf2,_0x6295fa);_0x3f4756(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix[_0x200a('0x5')](e,emitEvent(event));}}module[_0x200a('0x6')]=VoicePrefixEvents;