Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / saProductQuotation / saProductQuotation.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 _0xe0fa=['http','request','then','info','SAProductQuotation,\x20%s,\x20%s','debug','SAProductQuotation,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','jayson/promise','client'];(function(_0x529c58,_0x5040d0){var _0x5ad8d8=function(_0x571785){while(--_0x571785){_0x529c58['push'](_0x529c58['shift']());}};_0x5ad8d8(++_0x5040d0);}(_0xe0fa,0x98));var _0xae0f=function(_0x44afa4,_0x5be27b){_0x44afa4=_0x44afa4-0x0;var _0xcad289=_0xe0fa[_0x44afa4];return _0xcad289;};'use strict';var _=require(_0xae0f('0x0'));var util=require('util');var moment=require(_0xae0f('0x1'));var BPromise=require(_0xae0f('0x2'));var rs=require(_0xae0f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xae0f('0x4'));var logger=require(_0xae0f('0x5'))(_0xae0f('0x6'));var config=require('../../config/environment');var jayson=require(_0xae0f('0x7'));var client=jayson[_0xae0f('0x8')][_0xae0f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x23cc7a,_0xf9d671,_0x786ce2){return new BPromise(function(_0x301c37,_0x4c0540){return client[_0xae0f('0xa')](_0x23cc7a,_0x786ce2)[_0xae0f('0xb')](function(_0x5b5ba1){logger[_0xae0f('0xc')](_0xae0f('0xd'),_0xf9d671,'request\x20sent');logger[_0xae0f('0xe')](_0xae0f('0xf'),_0xf9d671,_0xae0f('0x10'),JSON[_0xae0f('0x11')](_0x5b5ba1));if(_0x5b5ba1[_0xae0f('0x12')]){if(_0x5b5ba1[_0xae0f('0x12')][_0xae0f('0x13')]===0x1f4){logger[_0xae0f('0x12')](_0xae0f('0xd'),_0xf9d671,_0x5b5ba1[_0xae0f('0x12')][_0xae0f('0x14')]);return _0x4c0540(_0x5b5ba1['error'][_0xae0f('0x14')]);}logger[_0xae0f('0x12')](_0xae0f('0xd'),_0xf9d671,_0x5b5ba1[_0xae0f('0x12')][_0xae0f('0x14')]);return _0x301c37(_0x5b5ba1[_0xae0f('0x12')][_0xae0f('0x14')]);}else{logger[_0xae0f('0xc')](_0xae0f('0xd'),_0xf9d671,_0xae0f('0x10'));_0x301c37(_0x5b5ba1[_0xae0f('0x15')][_0xae0f('0x14')]);}})[_0xae0f('0x16')](function(_0x194a4d){logger[_0xae0f('0x12')](_0xae0f('0xd'),_0xf9d671,_0x194a4d);_0x4c0540(_0x194a4d);});});}