Built motion from commit a61a4a20.|2.5.46
[motion2.git] / server / api / intZohoAccount / intZohoAccount.controller.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 _0xa5ef=['destroy','error','stack','name','send','index','map','ZohoAccount','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','create','body','find','params','getConfigurations','findOne','ZohoConfiguration','Subjects','getSubjects','getDescriptions','channel','ZohoField','Descriptions','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','https://accounts.zoho.com.cn','POST','/oauth/v2/token','refreshToken','clientId','clientSecret','refresh_token','access_token','Unable\x20to\x20retrieve\x20the\x20access\x20token','getFields','host','serverUrl','code','zoho.eu','slice','substring','lastIndexOf','Refresh\x20Token\x20not\x20available\x20for\x20the\x20account','format','https://www.zohoapis.%s/crm/v2/settings/fields','response','message','Owner','Subject','WhoId','Call_Result','Call_Start_Time','Call_Type','remove','api_name','system_mandatory','push','display_label','custom_field','data_type','picklist','pick_list_values','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../mysqldb','../../components/integrations/configuration','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','update','then'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0xa5ef,0xe3));var _0xfa5e=function(_0x1484c4,_0x2d844b){_0x1484c4=_0x1484c4-0x0;var _0x598b70=_0xa5ef[_0x1484c4];return _0x598b70;};'use strict';var emlformat=require(_0xfa5e('0x0'));var rimraf=require(_0xfa5e('0x1'));var zipdir=require(_0xfa5e('0x2'));var jsonpatch=require(_0xfa5e('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xfa5e('0x4'));var Mustache=require(_0xfa5e('0x5'));var util=require(_0xfa5e('0x6'));var path=require('path');var sox=require(_0xfa5e('0x7'));var csv=require(_0xfa5e('0x8'));var ejs=require(_0xfa5e('0x9'));var fs=require('fs');var fs_extra=require(_0xfa5e('0xa'));var _=require(_0xfa5e('0xb'));var squel=require('squel');var crypto=require(_0xfa5e('0xc'));var jsforce=require(_0xfa5e('0xd'));var deskjs=require(_0xfa5e('0xe'));var toCsv=require(_0xfa5e('0x8'));var querystring=require(_0xfa5e('0xf'));var Papa=require(_0xfa5e('0x10'));var Redis=require(_0xfa5e('0x11'));var authService=require(_0xfa5e('0x12'));var qs=require(_0xfa5e('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfa5e('0x14'));var logger=require('../../config/logger')(_0xfa5e('0x15'));var utils=require(_0xfa5e('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xfa5e('0x17'))['db'];var integrations=require(_0xfa5e('0x18'));function respondWithStatusCode(_0x3120aa,_0x1d4aad){_0x1d4aad=_0x1d4aad||0xcc;return function(_0x69df1d){if(_0x69df1d){return _0x3120aa[_0xfa5e('0x19')](_0x1d4aad);}return _0x3120aa[_0xfa5e('0x1a')](_0x1d4aad)[_0xfa5e('0x1b')]();};}function respondWithResult(_0x2fe9ba,_0x5a8def){_0x5a8def=_0x5a8def||0xc8;return function(_0x24bb19){if(_0x24bb19){return _0x2fe9ba[_0xfa5e('0x1a')](_0x5a8def)['json'](_0x24bb19);}};}function respondWithFilteredResult(_0x481ec7,_0x30ee44){return function(_0x33de0f){if(_0x33de0f){var _0x47c653=typeof _0x30ee44[_0xfa5e('0x1c')]===_0xfa5e('0x1d')&&typeof _0x30ee44[_0xfa5e('0x1e')]===_0xfa5e('0x1d');var _0x395f2e=_0x33de0f[_0xfa5e('0x1f')];var _0x5c6ae5=_0x47c653?0x0:_0x30ee44[_0xfa5e('0x1c')];var _0x555167=_0x47c653?_0x33de0f[_0xfa5e('0x1f')]:_0x30ee44[_0xfa5e('0x1c')]+_0x30ee44[_0xfa5e('0x1e')];var _0x27cb3f;if(_0x555167>=_0x395f2e){_0x555167=_0x395f2e;_0x27cb3f=0xc8;}else{_0x27cb3f=0xce;}_0x481ec7['status'](_0x27cb3f);return _0x481ec7[_0xfa5e('0x20')](_0xfa5e('0x21'),_0x5c6ae5+'-'+_0x555167+'/'+_0x395f2e)[_0xfa5e('0x22')](_0x33de0f);}return null;};}function patchUpdates(_0x153b58){return function(_0x2d86c0){try{jsonpatch[_0xfa5e('0x23')](_0x2d86c0,_0x153b58,!![]);}catch(_0x1fa51f){return BPromise[_0xfa5e('0x24')](_0x1fa51f);}return _0x2d86c0['save']();};}function saveUpdates(_0x47911d,_0x5dbbd9){return function(_0x1d1f1a){if(_0x1d1f1a){return _0x1d1f1a[_0xfa5e('0x25')](_0x47911d)[_0xfa5e('0x26')](function(_0x2e270c){return _0x2e270c;});}return null;};}function removeEntity(_0x5c6025,_0x4a90b9){return function(_0x3494c0){if(_0x3494c0){return _0x3494c0[_0xfa5e('0x27')]()[_0xfa5e('0x26')](function(){_0x5c6025[_0xfa5e('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x20d667,_0x108fa2){return function(_0x707feb){if(!_0x707feb){_0x20d667[_0xfa5e('0x19')](0x194);}return _0x707feb;};}function handleError(_0x577c00,_0x5428d4){_0x5428d4=_0x5428d4||0x1f4;return function(_0x4def9e){logger[_0xfa5e('0x28')](_0x4def9e[_0xfa5e('0x29')]);if(_0x4def9e[_0xfa5e('0x2a')]){delete _0x4def9e['name'];}_0x577c00[_0xfa5e('0x1a')](_0x5428d4)[_0xfa5e('0x2b')](_0x4def9e);};}exports[_0xfa5e('0x2c')]=function(_0x24b380,_0x2e16b1){var _0x3d53ed={},_0x360649={},_0x260951={'count':0x0,'rows':[]};var _0x3c9409=_[_0xfa5e('0x2d')](db[_0xfa5e('0x2e')][_0xfa5e('0x2f')],function(_0x3b7356){return{'name':_0x3b7356[_0xfa5e('0x30')],'type':_0x3b7356[_0xfa5e('0x31')][_0xfa5e('0x32')]};});_0x360649[_0xfa5e('0x33')]=_[_0xfa5e('0x2d')](_0x3c9409,'name');_0x360649[_0xfa5e('0x34')]=_[_0xfa5e('0x35')](_0x24b380['query']);_0x360649['filters']=_[_0xfa5e('0x36')](_0x360649[_0xfa5e('0x33')],_0x360649['query']);_0x3d53ed[_0xfa5e('0x37')]=_[_0xfa5e('0x36')](_0x360649[_0xfa5e('0x33')],qs[_0xfa5e('0x38')](_0x24b380[_0xfa5e('0x34')][_0xfa5e('0x38')]));_0x3d53ed[_0xfa5e('0x37')]=_0x3d53ed[_0xfa5e('0x37')][_0xfa5e('0x39')]?_0x3d53ed[_0xfa5e('0x37')]:_0x360649[_0xfa5e('0x33')];if(!_0x24b380[_0xfa5e('0x34')][_0xfa5e('0x3a')](_0xfa5e('0x3b'))){_0x3d53ed[_0xfa5e('0x1e')]=qs[_0xfa5e('0x1e')](_0x24b380[_0xfa5e('0x34')][_0xfa5e('0x1e')]);_0x3d53ed['offset']=qs[_0xfa5e('0x1c')](_0x24b380[_0xfa5e('0x34')][_0xfa5e('0x1c')]);}_0x3d53ed[_0xfa5e('0x3c')]=qs['sort'](_0x24b380[_0xfa5e('0x34')][_0xfa5e('0x3d')]);_0x3d53ed['where']=qs[_0xfa5e('0x3e')](_[_0xfa5e('0x3f')](_0x24b380[_0xfa5e('0x34')],_0x360649[_0xfa5e('0x3e')]),_0x3c9409);if(_0x24b380[_0xfa5e('0x34')][_0xfa5e('0x40')]){_0x3d53ed[_0xfa5e('0x41')]=_[_0xfa5e('0x42')](_0x3d53ed['where'],{'$or':_['map'](_0x3c9409,function(_0x29c69d){if(_0x29c69d['type']!==_0xfa5e('0x43')){var _0x143c6d={};_0x143c6d[_0x29c69d[_0xfa5e('0x2a')]]={'$like':'%'+_0x24b380['query'][_0xfa5e('0x40')]+'%'};return _0x143c6d;}})});}_0x3d53ed=_[_0xfa5e('0x42')]({},_0x3d53ed,_0x24b380[_0xfa5e('0x44')]);var _0x27c7df={'where':_0x3d53ed[_0xfa5e('0x41')]};return db[_0xfa5e('0x2e')][_0xfa5e('0x1f')](_0x27c7df)['then'](function(_0x5ea986){_0x260951['count']=_0x5ea986;if(_0x24b380[_0xfa5e('0x34')][_0xfa5e('0x45')]){_0x3d53ed[_0xfa5e('0x46')]=[{'all':!![]}];}return db['ZohoAccount'][_0xfa5e('0x47')](_0x3d53ed);})[_0xfa5e('0x26')](function(_0x50ba0f){_0x260951[_0xfa5e('0x48')]=_0x50ba0f;return _0x260951;})['then'](respondWithFilteredResult(_0x2e16b1,_0x3d53ed))[_0xfa5e('0x49')](handleError(_0x2e16b1,null));};exports['show']=function(_0x44b81d,_0x38ff9e){var _0x46b24a={'raw':![],'where':{'id':_0x44b81d['params']['id']}},_0x5cba92={};_0x5cba92['model']=_[_0xfa5e('0x35')](db[_0xfa5e('0x2e')][_0xfa5e('0x2f')]);_0x5cba92['query']=_[_0xfa5e('0x35')](_0x44b81d[_0xfa5e('0x34')]);_0x5cba92['filters']=_[_0xfa5e('0x36')](_0x5cba92[_0xfa5e('0x33')],_0x5cba92[_0xfa5e('0x34')]);_0x46b24a[_0xfa5e('0x37')]=_['intersection'](_0x5cba92[_0xfa5e('0x33')],qs[_0xfa5e('0x38')](_0x44b81d[_0xfa5e('0x34')][_0xfa5e('0x38')]));_0x46b24a[_0xfa5e('0x37')]=_0x46b24a['attributes'][_0xfa5e('0x39')]?_0x46b24a[_0xfa5e('0x37')]:_0x5cba92[_0xfa5e('0x33')];if(_0x44b81d[_0xfa5e('0x34')]['includeAll']){_0x46b24a[_0xfa5e('0x46')]=[{'all':!![]}];}_0x46b24a=_['merge']({},_0x46b24a,_0x44b81d[_0xfa5e('0x44')]);return db[_0xfa5e('0x2e')]['find'](_0x46b24a)['then'](handleEntityNotFound(_0x38ff9e,null))[_0xfa5e('0x26')](respondWithResult(_0x38ff9e,null))[_0xfa5e('0x49')](handleError(_0x38ff9e,null));};exports[_0xfa5e('0x4a')]=function(_0x3d3038,_0x3bc16a){return db[_0xfa5e('0x2e')]['create'](_0x3d3038[_0xfa5e('0x4b')],{})[_0xfa5e('0x26')](respondWithResult(_0x3bc16a,0xc9))[_0xfa5e('0x49')](handleError(_0x3bc16a,null));};exports[_0xfa5e('0x25')]=function(_0x3b0222,_0x547624){if(_0x3b0222[_0xfa5e('0x4b')]['id']){delete _0x3b0222[_0xfa5e('0x4b')]['id'];}return db[_0xfa5e('0x2e')][_0xfa5e('0x4c')]({'where':{'id':_0x3b0222[_0xfa5e('0x4d')]['id']}})[_0xfa5e('0x26')](handleEntityNotFound(_0x547624,null))[_0xfa5e('0x26')](saveUpdates(_0x3b0222[_0xfa5e('0x4b')],null))[_0xfa5e('0x26')](respondWithResult(_0x547624,null))[_0xfa5e('0x49')](handleError(_0x547624,null));};exports[_0xfa5e('0x27')]=function(_0x5393aa,_0x19d86f){return db['ZohoAccount'][_0xfa5e('0x4c')]({'where':{'id':_0x5393aa[_0xfa5e('0x4d')]['id']}})[_0xfa5e('0x26')](handleEntityNotFound(_0x19d86f,null))['then'](removeEntity(_0x19d86f,null))[_0xfa5e('0x49')](handleError(_0x19d86f,null));};exports[_0xfa5e('0x4e')]=function(_0x56f5bd,_0x6a8fae,_0x355c3d){var _0x94b96d={};var _0x3adcb9={};var _0x4a7efa;var _0x51e39b;return db[_0xfa5e('0x2e')][_0xfa5e('0x4f')]({'where':{'id':_0x56f5bd[_0xfa5e('0x4d')]['id']}})[_0xfa5e('0x26')](handleEntityNotFound(_0x6a8fae,null))['then'](function(_0x125092){if(_0x125092){_0x4a7efa=_0x125092;_0x3adcb9[_0xfa5e('0x33')]=_['keys'](db[_0xfa5e('0x50')][_0xfa5e('0x2f')]);_0x3adcb9[_0xfa5e('0x34')]=_[_0xfa5e('0x35')](_0x56f5bd[_0xfa5e('0x34')]);_0x3adcb9[_0xfa5e('0x3e')]=_[_0xfa5e('0x36')](_0x3adcb9[_0xfa5e('0x33')],_0x3adcb9['query']);_0x94b96d[_0xfa5e('0x37')]=_[_0xfa5e('0x36')](_0x3adcb9[_0xfa5e('0x33')],qs[_0xfa5e('0x38')](_0x56f5bd[_0xfa5e('0x34')]['fields']));_0x94b96d[_0xfa5e('0x37')]=_0x94b96d[_0xfa5e('0x37')][_0xfa5e('0x39')]?_0x94b96d[_0xfa5e('0x37')]:_0x3adcb9[_0xfa5e('0x33')];_0x94b96d[_0xfa5e('0x3c')]=qs['sort'](_0x56f5bd['query'][_0xfa5e('0x3d')]);_0x94b96d[_0xfa5e('0x41')]=qs[_0xfa5e('0x3e')](_['pick'](_0x56f5bd['query'],_0x3adcb9['filters']));if(_0x56f5bd[_0xfa5e('0x34')]['filter']){_0x94b96d[_0xfa5e('0x41')]=_['merge'](_0x94b96d['where'],{'$or':_['map'](_0x94b96d[_0xfa5e('0x37')],function(_0x5f18fc){var _0xca0498={};_0xca0498[_0x5f18fc]={'$like':'%'+_0x56f5bd[_0xfa5e('0x34')][_0xfa5e('0x40')]+'%'};return _0xca0498;})});}_0x94b96d=_[_0xfa5e('0x42')]({},_0x94b96d,_0x56f5bd['options']);return _0x4a7efa[_0xfa5e('0x4e')](_0x94b96d);}})['then'](function(_0x69d60f){if(_0x69d60f){_0x51e39b=_0x69d60f['length'];if(!_0x56f5bd['query'][_0xfa5e('0x3a')](_0xfa5e('0x3b'))){_0x94b96d[_0xfa5e('0x1e')]=qs[_0xfa5e('0x1e')](_0x56f5bd[_0xfa5e('0x34')][_0xfa5e('0x1e')]);_0x94b96d[_0xfa5e('0x1c')]=qs[_0xfa5e('0x1c')](_0x56f5bd['query'][_0xfa5e('0x1c')]);}return _0x4a7efa['getConfigurations'](_0x94b96d);}})['then'](function(_0x1f8bc0){if(_0x1f8bc0){return _0x1f8bc0?{'count':_0x51e39b,'rows':_0x1f8bc0}:null;}})[_0xfa5e('0x26')](respondWithResult(_0x6a8fae,null))[_0xfa5e('0x49')](handleError(_0x6a8fae,null));};exports['addConfiguration']=function(_0x34cd75,_0x5e1e4c,_0x455116){if(_0x34cd75[_0xfa5e('0x4b')]['id']){delete _0x34cd75[_0xfa5e('0x4b')]['id'];}return db[_0xfa5e('0x2e')][_0xfa5e('0x4f')]({'where':{'id':_0x34cd75[_0xfa5e('0x4d')]['id']}})[_0xfa5e('0x26')](handleEntityNotFound(_0x5e1e4c,null))[_0xfa5e('0x26')](function(_0x26effa){if(_0x26effa){_0x34cd75['body']['AccountId']=_0x26effa['id'];_0x34cd75[_0xfa5e('0x4b')][_0xfa5e('0x51')]=integrations[_0xfa5e('0x52')](_0x34cd75['body']['channel'],_0x34cd75['body'][_0xfa5e('0x31')]);_0x34cd75[_0xfa5e('0x4b')]['Descriptions']=integrations[_0xfa5e('0x53')](_0x34cd75[_0xfa5e('0x4b')][_0xfa5e('0x54')],_0x34cd75[_0xfa5e('0x4b')][_0xfa5e('0x31')]);return db[_0xfa5e('0x50')][_0xfa5e('0x4a')](_0x34cd75[_0xfa5e('0x4b')],{'include':[{'model':db[_0xfa5e('0x55')],'as':'Subjects'},{'model':db['ZohoField'],'as':_0xfa5e('0x56')}]});}return null;})[_0xfa5e('0x26')](respondWithResult(_0x5e1e4c,null))[_0xfa5e('0x49')](handleError(_0x5e1e4c,null));};function getAccessToken(_0x26f982){return new Promise(function(_0x500f2c,_0x10c90e){var _0x52bb34;switch(_0x26f982['zone']){case'US':_0x52bb34=_0xfa5e('0x57');break;case'AU':_0x52bb34=_0xfa5e('0x58');break;case'EU':_0x52bb34=_0xfa5e('0x59');break;case'IN':_0x52bb34=_0xfa5e('0x5a');break;case'CN':_0x52bb34=_0xfa5e('0x5b');break;default:_0x52bb34=_0xfa5e('0x59');break;}var _0x325fb4={'method':_0xfa5e('0x5c'),'uri':_0x52bb34+_0xfa5e('0x5d'),'qs':{'refresh_token':_0x26f982[_0xfa5e('0x5e')],'client_id':_0x26f982[_0xfa5e('0x5f')],'client_secret':_0x26f982[_0xfa5e('0x60')],'grant_type':_0xfa5e('0x61')},'json':!![]};return rp(_0x325fb4)[_0xfa5e('0x26')](function(_0xc1ab89){if(_0xc1ab89[_0xfa5e('0x62')]){_0x500f2c(_0xc1ab89[_0xfa5e('0x62')]);}else{_0x10c90e(_0xfa5e('0x63'));}})[_0xfa5e('0x49')](function(_0x1c9ab6){_0x10c90e(_0x1c9ab6);});});}exports[_0xfa5e('0x64')]=function(_0x162f7c,_0x137eeb,_0x1abcc6){var _0x29f847,_0x156e39,_0x271c92,_0x271438,_0x300acb;return db['ZohoAccount'][_0xfa5e('0x4f')]({'where':{'id':_0x162f7c[_0xfa5e('0x4d')]['id']},'attributes':['id',_0xfa5e('0x65'),'zone','clientId',_0xfa5e('0x60'),_0xfa5e('0x66'),_0xfa5e('0x67'),_0xfa5e('0x5e')]})['then'](handleEntityNotFound(_0x137eeb,null))[_0xfa5e('0x26')](function(_0x35247f){_0x300acb=_0x35247f;_0x29f847=_0x300acb[_0xfa5e('0x65')];_0x156e39=_0x29f847===_0xfa5e('0x68')?'eu':'com';_0x271c92=_0x300acb['serverUrl'];var _0x2c4881=_0x271c92[_0xfa5e('0x69')](-0x1);if(_0x2c4881==='/'||_0x2c4881==='\x5c'||_0x2c4881===':'){_0x271c92=_0x271c92[_0xfa5e('0x6a')](0x0,_0x271c92[_0xfa5e('0x6b')](_0x2c4881));}if(!_0x300acb[_0xfa5e('0x5e')]){throw new Error(_0xfa5e('0x6c'));}return getAccessToken(_0x300acb);})[_0xfa5e('0x26')](function(_0x2a2db3){if(_0x2a2db3){return rp({'method':'GET','uri':util[_0xfa5e('0x6d')](_0xfa5e('0x6e'),_0x156e39),'qs':{'module':'Calls'},'headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x2a2db3},'json':!![]});}})[_0xfa5e('0x26')](function(_0x171c63){if(_0x171c63){if(_0x171c63[_0xfa5e('0x6f')]&&_0x171c63[_0xfa5e('0x6f')][_0xfa5e('0x28')]){throw new Error(_0x171c63[_0xfa5e('0x6f')][_0xfa5e('0x28')][_0xfa5e('0x70')]);}var _0x11e792=[];var _0x586dda=[];var _0x30e1ad=[_0xfa5e('0x71'),_0xfa5e('0x72'),'Description',_0xfa5e('0x73'),'Call_Duration',_0xfa5e('0x74'),_0xfa5e('0x75'),_0xfa5e('0x76')];_0x586dda=_[_0xfa5e('0x77')](_0x171c63[_0xfa5e('0x38')],function(_0x15cf2a){return _0x30e1ad['includes'](_0x15cf2a[_0xfa5e('0x78')]);});for(var _0x21dbb7=0x0;_0x21dbb7<_0x586dda[_0xfa5e('0x39')];_0x21dbb7++){if(_0x586dda[_0x21dbb7][_0xfa5e('0x79')]===![]){_0x11e792[_0xfa5e('0x7a')]({'id':_0x586dda[_0x21dbb7]['id'],'name':_0x586dda[_0x21dbb7][_0xfa5e('0x7b')],'custom':_0x586dda[_0x21dbb7][_0xfa5e('0x7c')],'options':_0x586dda[_0x21dbb7][_0xfa5e('0x7d')]===_0xfa5e('0x7e')&&_0x586dda[_0x21dbb7][_0xfa5e('0x7f')][_0xfa5e('0x39')]>-0x1?_[_0xfa5e('0x2d')](_0x586dda[_0x21dbb7][_0xfa5e('0x7f')],function(_0x5ac822){return{'name':_0x5ac822,'value':_0x5ac822};}):[]});}}return{'count':_0x11e792[_0xfa5e('0x39')],'rows':_0x11e792};}else{return{'count':0x0,'rows':[]};}})[_0xfa5e('0x26')](respondWithResult(_0x137eeb,null))[_0xfa5e('0x49')](function(_0x5b6d26){var _0x549914=_0x162f7c[_0xfa5e('0x34')][_0xfa5e('0x80')]?0x1f4:_0x5b6d26[_0xfa5e('0x81')]||0x1f4;logger['error'](_0xfa5e('0x82'),_0xfa5e('0x64'),_0x549914,JSON[_0xfa5e('0x83')](_0x5b6d26));delete _0x5b6d26[_0xfa5e('0x2a')];if(_0x549914===0x191){_0x549914=0x190;}_0x137eeb[_0xfa5e('0x1a')](_0x549914)[_0xfa5e('0x2b')](_0x162f7c['query'][_0xfa5e('0x80')]?{'message':_0xfa5e('0x84'),'statusCode':_0x5b6d26[_0xfa5e('0x81')]}:_0x5b6d26);});};