Built motion from commit cf5ff673.|2.5.41
[motion2.git] / server / services / ami / trigger / script / index.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 _0xd8d6=['exec','data2','Script','render','data3','format','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs','mustache','trigger'];(function(_0x1474ef,_0x28572a){var _0x37ebf5=function(_0x3d5c40){while(--_0x3d5c40){_0x1474ef['push'](_0x1474ef['shift']());}};_0x37ebf5(++_0x28572a);}(_0xd8d6,0x17d));var _0x6d8d=function(_0x1fbe76,_0x56c0f8){_0x1fbe76=_0x1fbe76-0x0;var _0x50048e=_0xd8d6[_0x1fbe76];return _0x50048e;};'use strict';var util=require(_0x6d8d('0x0'));var sh=require(_0x6d8d('0x1'));var Mustache=require(_0x6d8d('0x2'));var logger=require('../../../../config/logger')(_0x6d8d('0x3'));exports[_0x6d8d('0x4')]=function(_0x44a8cd,_0x5dede3){var _0x1477c1=_0x44a8cd[_0x6d8d('0x5')]?_0x44a8cd[_0x6d8d('0x5')]:_0x6d8d('0x6');var _0x3b723c=_0x44a8cd['data3']?Mustache[_0x6d8d('0x7')](_0x44a8cd[_0x6d8d('0x8')],_0x5dede3):_0x5dede3;sh[_0x6d8d('0x4')](_0x3b723c,function(_0x2a503f,_0x4c81d7,_0x24acfb){if(_0x2a503f!==0x0){logger['error'](util[_0x6d8d('0x9')]('%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s',_0x1477c1,_0x3b723c,_0x2a503f,_0x24acfb));}else{logger['info'](util[_0x6d8d('0x9')](_0x6d8d('0xa'),_0x1477c1,_0x3b723c,_0x4c81d7));}});};