Built motion from commit 953226e6.|2.6.32
[motion2.git] / server / api / openchannelTransferReport / openchannelTransferReport.rpc.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 _0x60c2=['stringify','error','code','message','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x55d282,_0x4577bf){var _0x5a1956=function(_0x5f301a){while(--_0x5f301a){_0x55d282['push'](_0x55d282['shift']());}};_0x5a1956(++_0x4577bf);}(_0x60c2,0x8f));var _0x260c=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x60c2[_0x3947c9];return _0x2e7871;};'use strict';var _=require('lodash');var util=require(_0x260c('0x0'));var moment=require(_0x260c('0x1'));var BPromise=require(_0x260c('0x2'));var rs=require(_0x260c('0x3'));var fs=require('fs');var Redis=require(_0x260c('0x4'));var db=require(_0x260c('0x5'))['db'];var utils=require(_0x260c('0x6'));var logger=require(_0x260c('0x7'))(_0x260c('0x8'));var config=require(_0x260c('0x9'));var jayson=require(_0x260c('0xa'));var client=jayson[_0x260c('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x14fab2,_0x2c2cd8,_0x3b432d){return new BPromise(function(_0xf22c37,_0x4b2992){return client[_0x260c('0xc')](_0x14fab2,_0x3b432d)[_0x260c('0xd')](function(_0x8378bb){logger[_0x260c('0xe')](_0x260c('0xf'),_0x2c2cd8,_0x260c('0x10'));logger[_0x260c('0x11')]('OpenchannelTransferReport,\x20%s,\x20%s,\x20%s',_0x2c2cd8,_0x260c('0x10'),JSON[_0x260c('0x12')](_0x8378bb));if(_0x8378bb[_0x260c('0x13')]){if(_0x8378bb['error'][_0x260c('0x14')]===0x1f4){logger[_0x260c('0x13')](_0x260c('0xf'),_0x2c2cd8,_0x8378bb['error'][_0x260c('0x15')]);return _0x4b2992(_0x8378bb[_0x260c('0x13')][_0x260c('0x15')]);}logger[_0x260c('0x13')](_0x260c('0xf'),_0x2c2cd8,_0x8378bb['error'][_0x260c('0x15')]);return _0xf22c37(_0x8378bb['error'][_0x260c('0x15')]);}else{logger[_0x260c('0xe')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x2c2cd8,_0x260c('0x10'));_0xf22c37(_0x8378bb['result'][_0x260c('0x15')]);}})[_0x260c('0x16')](function(_0x411970){logger[_0x260c('0x13')](_0x260c('0xf'),_0x2c2cd8,_0x411970);_0x4b2992(_0x411970);});});}