Built motion from commit e1760111.|2.6.18
[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 _0x7bd8=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','VoiceExtension'];(function(_0x3ff965,_0x1a432a){var _0xeccf3=function(_0x19dedf){while(--_0x19dedf){_0x3ff965['push'](_0x3ff965['shift']());}};_0xeccf3(++_0x1a432a);}(_0x7bd8,0x15b));var _0x87bd=function(_0x4d12d9,_0x3321f7){_0x4d12d9=_0x4d12d9-0x0;var _0x32de14=_0x7bd8[_0x4d12d9];return _0x32de14;};'use strict';var EventEmitter=require(_0x87bd('0x0'));var VoiceExtension=require(_0x87bd('0x1'))['db'][_0x87bd('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x87bd('0x3')](0x0);var events={'afterCreate':_0x87bd('0x4'),'afterUpdate':_0x87bd('0x5'),'afterDestroy':_0x87bd('0x6')};function emitEvent(_0x3f782d){return function(_0xcafcda,_0x36fa99,_0x1970c4){VoiceExtensionEvents[_0x87bd('0x7')](_0x3f782d+':'+_0xcafcda['id'],_0xcafcda);VoiceExtensionEvents[_0x87bd('0x7')](_0x3f782d,_0xcafcda);_0x1970c4(null);};}for(var e in events){if(events[_0x87bd('0x8')](e)){var event=events[e];VoiceExtension[_0x87bd('0x9')](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;