Built motion from commit (unavailable).|2.5.21
[motion2.git] / server / api / voiceExtension / voiceExtension.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 _0xe001=['exports','../../mysqldb','VoiceExtension','setMaxListeners','save','update','remove','emit','hook'];(function(_0x45fd65,_0x321af3){var _0x5bde51=function(_0x1be83e){while(--_0x1be83e){_0x45fd65['push'](_0x45fd65['shift']());}};_0x5bde51(++_0x321af3);}(_0xe001,0x19f));var _0x1e00=function(_0x176ce9,_0x99961b){_0x176ce9=_0x176ce9-0x0;var _0x5e8203=_0xe001[_0x176ce9];return _0x5e8203;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0x1e00('0x0'))['db'][_0x1e00('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x1e00('0x2')](0x0);var events={'afterCreate':_0x1e00('0x3'),'afterUpdate':_0x1e00('0x4'),'afterDestroy':_0x1e00('0x5')};function emitEvent(_0x10ec74){return function(_0x2867f8,_0x12ee44,_0x51590b){VoiceExtensionEvents[_0x1e00('0x6')](_0x10ec74+':'+_0x2867f8['id'],_0x2867f8);VoiceExtensionEvents[_0x1e00('0x6')](_0x10ec74,_0x2867f8);_0x51590b(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension[_0x1e00('0x7')](e,emitEvent(event));}}module[_0x1e00('0x8')]=VoiceExtensionEvents;