Built motion from commit (unavailable).|2.4.21
[motion2.git] / server / api / intZohoConfiguration / intZohoConfiguration.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 _0x3e74=['keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','pick','where','filter','merge','options','ZohoConfiguration','include','findAll','rawAttributes','length','create','body','find','destroy','getFields','findOne','params','ZohoField','getSubjects','getDescriptions','html-pdf','rimraf','zip-dir','fast-json-patch','bluebird','util','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','jayson/promise','client','http','test','Sequelize','request','then','ZohoConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZohoConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','sendStatus','status','end','count','offset','limit','set','Content-Range','json','apply','save','update','send','map','fieldName','type','key','model','name','query'];(function(_0x12fcbd,_0x884804){var _0x28ec2a=function(_0xa5ff99){while(--_0xa5ff99){_0x12fcbd['push'](_0x12fcbd['shift']());}};_0x28ec2a(++_0x884804);}(_0x3e74,0x175));var _0x43e7=function(_0x5b381e,_0x37df68){_0x5b381e=_0x5b381e-0x0;var _0x2dccff=_0x3e74[_0x5b381e];return _0x2dccff;};'use strict';var pdf=require(_0x43e7('0x0'));var emlformat=require('eml-format');var rimraf=require(_0x43e7('0x1'));var zipdir=require(_0x43e7('0x2'));var jsonpatch=require(_0x43e7('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x43e7('0x4'));var Mustache=require('mustache');var util=require(_0x43e7('0x5'));var path=require(_0x43e7('0x6'));var sox=require(_0x43e7('0x7'));var csv=require(_0x43e7('0x8'));var ejs=require(_0x43e7('0x9'));var fs=require('fs');var _=require('lodash');var squel=require(_0x43e7('0xa'));var crypto=require(_0x43e7('0xb'));var jsforce=require(_0x43e7('0xc'));var deskjs=require(_0x43e7('0xd'));var toCsv=require(_0x43e7('0x8'));var querystring=require('querystring');var Papa=require(_0x43e7('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x43e7('0xf'));var as=require(_0x43e7('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x43e7('0x11'))('api');var utils=require(_0x43e7('0x12'));var config=require(_0x43e7('0x13'));var db=require('../../mysqldb')['db'];var jayson=require(_0x43e7('0x14'));var client=jayson[_0x43e7('0x15')][_0x43e7('0x16')]({'port':0x232a});function checkPasswordPattern(_0x3bb83f,_0x4e008c,_0x583d85){if(_0x583d85){var _0x2fcb36=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2fcb36[_0x43e7('0x17')](_0x4e008c)){return _0x3bb83f;}else{throw new db[(_0x43e7('0x18'))]['ValidationError']('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');}}else{return _0x3bb83f;}}function respondWithRpcPromise(_0x16849c,_0x14c146,_0x203378,_0x328445){return new BPromise(function(_0x4de324,_0x5c4eaa){var _0xdf16c=_0x328445||client;return _0xdf16c[_0x43e7('0x19')](_0x16849c,_0x203378)[_0x43e7('0x1a')](function(_0x5d346f){logger['info'](_0x43e7('0x1b'),_0x14c146,_0x43e7('0x1c'));logger[_0x43e7('0x1d')](_0x43e7('0x1e'),_0x14c146,_0x43e7('0x1c'),JSON[_0x43e7('0x1f')](_0x5d346f));if(_0x5d346f[_0x43e7('0x20')]){if(_0x5d346f[_0x43e7('0x20')][_0x43e7('0x21')]===0x1f4){logger[_0x43e7('0x20')](_0x43e7('0x1b'),_0x14c146,_0x5d346f[_0x43e7('0x20')]['message']);return _0x5c4eaa(_0x5d346f[_0x43e7('0x20')][_0x43e7('0x22')]);}logger['error'](_0x43e7('0x1b'),_0x14c146,_0x5d346f[_0x43e7('0x20')][_0x43e7('0x22')]);return _0x4de324(_0x5d346f[_0x43e7('0x20')][_0x43e7('0x22')]);}else{logger[_0x43e7('0x23')]('ZohoConfiguration,\x20%s,\x20%s',_0x14c146,_0x43e7('0x1c'));_0x4de324(_0x5d346f['result']['message']);}})[_0x43e7('0x24')](function(_0x43f4ff){logger['error'](_0x43e7('0x1b'),_0x14c146,_0x43f4ff);_0x5c4eaa(_0x43f4ff);});});}function respondWithStatusCode(_0x4ca5cf,_0x326dab){_0x326dab=_0x326dab||0xcc;return function(_0x5c5e67){if(_0x5c5e67){return _0x4ca5cf[_0x43e7('0x25')](_0x326dab);}return _0x4ca5cf[_0x43e7('0x26')](_0x326dab)[_0x43e7('0x27')]();};}function respondWithResult(_0x405f85,_0x51f4d7){_0x51f4d7=_0x51f4d7||0xc8;return function(_0x52b7b3){if(_0x52b7b3){return _0x405f85[_0x43e7('0x26')](_0x51f4d7)['json'](_0x52b7b3);}};}function respondWithFilteredResult(_0x2dd5f,_0x40dc8f){return function(_0x3565cf){if(_0x3565cf){var _0xb1fc63=_0x3565cf[_0x43e7('0x28')],_0x5087d7=_0x40dc8f[_0x43e7('0x29')],_0x33a1a5=_0x40dc8f[_0x43e7('0x29')]+_0x40dc8f[_0x43e7('0x2a')],_0x4690a6;if(_0x33a1a5>=_0xb1fc63){_0x33a1a5=_0xb1fc63;_0x4690a6=0xc8;}else{_0x4690a6=0xce;}_0x2dd5f[_0x43e7('0x26')](_0x4690a6);return _0x2dd5f[_0x43e7('0x2b')](_0x43e7('0x2c'),_0x5087d7+'-'+_0x33a1a5+'/'+_0xb1fc63)[_0x43e7('0x2d')](_0x3565cf);}return null;};}function patchUpdates(_0x17df44){return function(_0x19725a){try{jsonpatch[_0x43e7('0x2e')](_0x19725a,_0x17df44,!![]);}catch(_0x208706){return BPromise['reject'](_0x208706);}return _0x19725a[_0x43e7('0x2f')]();};}function saveUpdates(_0x44f6b0,_0x3b8f78){return function(_0x183c81){if(_0x183c81){return _0x183c81[_0x43e7('0x30')](_0x44f6b0)['then'](function(_0x1eba65){return _0x1eba65;});}return null;};}function removeEntity(_0x49b83d,_0x30d47e){return function(_0x3f280d){if(_0x3f280d){return _0x3f280d['destroy']()['then'](function(){_0x49b83d['status'](0xcc)[_0x43e7('0x27')]();});}};}function handleEntityNotFound(_0xbe6e28,_0x117c07){return function(_0x234fe6){if(!_0x234fe6){_0xbe6e28[_0x43e7('0x25')](0x194);}return _0x234fe6;};}function handleError(_0xde7ed,_0x485c6c){_0x485c6c=_0x485c6c||0x1f4;return function(_0x47baee){logger['error'](_0x47baee['stack']);if(_0x47baee['name']){delete _0x47baee['name'];}_0xde7ed['status'](_0x485c6c)[_0x43e7('0x31')](_0x47baee);};}exports['index']=function(_0x2b4bfd,_0x8e9f40){var _0x31bc78={},_0x50a2d0={},_0x40f72f={'count':0x0,'rows':[]};var _0x449803=_[_0x43e7('0x32')](db['ZohoConfiguration']['rawAttributes'],function(_0x5d84f4){return{'name':_0x5d84f4[_0x43e7('0x33')],'type':_0x5d84f4[_0x43e7('0x34')][_0x43e7('0x35')]};});_0x50a2d0[_0x43e7('0x36')]=_[_0x43e7('0x32')](_0x449803,_0x43e7('0x37'));_0x50a2d0[_0x43e7('0x38')]=_[_0x43e7('0x39')](_0x2b4bfd['query']);_0x50a2d0[_0x43e7('0x3a')]=_[_0x43e7('0x3b')](_0x50a2d0['model'],_0x50a2d0[_0x43e7('0x38')]);_0x31bc78['attributes']=_[_0x43e7('0x3b')](_0x50a2d0[_0x43e7('0x36')],qs[_0x43e7('0x3c')](_0x2b4bfd[_0x43e7('0x38')][_0x43e7('0x3c')]));_0x31bc78[_0x43e7('0x3d')]=_0x31bc78['attributes']['length']?_0x31bc78[_0x43e7('0x3d')]:_0x50a2d0[_0x43e7('0x36')];if(!_0x2b4bfd[_0x43e7('0x38')][_0x43e7('0x3e')](_0x43e7('0x3f'))){_0x31bc78['limit']=qs[_0x43e7('0x2a')](_0x2b4bfd[_0x43e7('0x38')]['limit']);_0x31bc78[_0x43e7('0x29')]=qs['offset'](_0x2b4bfd[_0x43e7('0x38')]['offset']);}_0x31bc78[_0x43e7('0x40')]=qs[_0x43e7('0x41')](_0x2b4bfd[_0x43e7('0x38')][_0x43e7('0x41')]);_0x31bc78['where']=qs['filters'](_[_0x43e7('0x42')](_0x2b4bfd[_0x43e7('0x38')],_0x50a2d0[_0x43e7('0x3a')]));if(_0x2b4bfd[_0x43e7('0x38')]['filter']){_0x31bc78['where']=_['merge'](_0x31bc78[_0x43e7('0x43')],{'$or':_['map'](_0x449803,function(_0x2ab022){if(_0x2ab022['type']!=='VIRTUAL'){var _0x46b2e6={};_0x46b2e6[_0x2ab022['name']]={'$like':'%'+_0x2b4bfd[_0x43e7('0x38')][_0x43e7('0x44')]+'%'};return _0x46b2e6;}})});}_0x31bc78=_[_0x43e7('0x45')]({},_0x31bc78,_0x2b4bfd[_0x43e7('0x46')]);var _0x4fc5e8={'where':_0x31bc78[_0x43e7('0x43')]};return db[_0x43e7('0x47')][_0x43e7('0x28')](_0x4fc5e8)[_0x43e7('0x1a')](function(_0x296dc8){_0x40f72f[_0x43e7('0x28')]=_0x296dc8;if(_0x2b4bfd['query']['includeAll']){_0x31bc78[_0x43e7('0x48')]=[{'all':!![]}];}return db[_0x43e7('0x47')][_0x43e7('0x49')](_0x31bc78);})['then'](function(_0x5c1c18){_0x40f72f['rows']=_0x5c1c18;return _0x40f72f;})[_0x43e7('0x1a')](respondWithFilteredResult(_0x8e9f40,_0x31bc78))[_0x43e7('0x24')](handleError(_0x8e9f40,null));};exports['show']=function(_0x351ca2,_0x47686e){var _0x3c96fe={'raw':![],'where':{'id':_0x351ca2['params']['id']}},_0x560329={};_0x560329['model']=_['keys'](db[_0x43e7('0x47')][_0x43e7('0x4a')]);_0x560329['query']=_[_0x43e7('0x39')](_0x351ca2[_0x43e7('0x38')]);_0x560329[_0x43e7('0x3a')]=_[_0x43e7('0x3b')](_0x560329['model'],_0x560329[_0x43e7('0x38')]);_0x3c96fe['attributes']=_['intersection'](_0x560329[_0x43e7('0x36')],qs[_0x43e7('0x3c')](_0x351ca2[_0x43e7('0x38')][_0x43e7('0x3c')]));_0x3c96fe[_0x43e7('0x3d')]=_0x3c96fe[_0x43e7('0x3d')][_0x43e7('0x4b')]?_0x3c96fe[_0x43e7('0x3d')]:_0x560329[_0x43e7('0x36')];if(_0x351ca2[_0x43e7('0x38')]['includeAll']){_0x3c96fe[_0x43e7('0x48')]=[{'all':!![]}];}_0x3c96fe=_[_0x43e7('0x45')]({},_0x3c96fe,_0x351ca2['options']);return db[_0x43e7('0x47')]['find'](_0x3c96fe)[_0x43e7('0x1a')](handleEntityNotFound(_0x47686e,null))[_0x43e7('0x1a')](respondWithResult(_0x47686e,null))[_0x43e7('0x24')](handleError(_0x47686e,null));};exports[_0x43e7('0x4c')]=function(_0xfe13fa,_0x5e5556){return db['ZohoConfiguration'][_0x43e7('0x4c')](_0xfe13fa[_0x43e7('0x4d')],{})[_0x43e7('0x1a')](respondWithResult(_0x5e5556,0xc9))[_0x43e7('0x24')](handleError(_0x5e5556,null));};exports[_0x43e7('0x30')]=function(_0x25bb44,_0xa47464){if(_0x25bb44[_0x43e7('0x4d')]['id']){delete _0x25bb44[_0x43e7('0x4d')]['id'];}return db[_0x43e7('0x47')][_0x43e7('0x4e')]({'where':{'id':_0x25bb44['params']['id']}})[_0x43e7('0x1a')](handleEntityNotFound(_0xa47464,null))[_0x43e7('0x1a')](saveUpdates(_0x25bb44['body'],null))[_0x43e7('0x1a')](respondWithResult(_0xa47464,null))[_0x43e7('0x24')](handleError(_0xa47464,null));};exports[_0x43e7('0x4f')]=function(_0x558d54,_0x5d63c6){return db[_0x43e7('0x47')][_0x43e7('0x4e')]({'where':{'id':_0x558d54['params']['id']}})[_0x43e7('0x1a')](handleEntityNotFound(_0x5d63c6,null))['then'](removeEntity(_0x5d63c6,null))['catch'](handleError(_0x5d63c6,null));};exports[_0x43e7('0x50')]=function(_0x4b6b7f,_0x1f7c02,_0x40155c){var _0x68697={};var _0x4dfdb0={};var _0xc3976;var _0xdb9fbe;return db['ZohoConfiguration'][_0x43e7('0x51')]({'where':{'id':_0x4b6b7f[_0x43e7('0x52')]['id']}})[_0x43e7('0x1a')](handleEntityNotFound(_0x1f7c02,null))['then'](function(_0x5a4c95){if(_0x5a4c95){_0xc3976=_0x5a4c95;_0x4dfdb0['model']=_[_0x43e7('0x39')](db[_0x43e7('0x53')][_0x43e7('0x4a')]);_0x4dfdb0[_0x43e7('0x38')]=_['keys'](_0x4b6b7f['query']);_0x4dfdb0[_0x43e7('0x3a')]=_[_0x43e7('0x3b')](_0x4dfdb0[_0x43e7('0x36')],_0x4dfdb0[_0x43e7('0x38')]);_0x68697['attributes']=_[_0x43e7('0x3b')](_0x4dfdb0[_0x43e7('0x36')],qs[_0x43e7('0x3c')](_0x4b6b7f[_0x43e7('0x38')][_0x43e7('0x3c')]));_0x68697[_0x43e7('0x3d')]=_0x68697[_0x43e7('0x3d')][_0x43e7('0x4b')]?_0x68697[_0x43e7('0x3d')]:_0x4dfdb0[_0x43e7('0x36')];_0x68697[_0x43e7('0x40')]=qs['sort'](_0x4b6b7f['query'][_0x43e7('0x41')]);_0x68697['where']=qs['filters'](_['pick'](_0x4b6b7f[_0x43e7('0x38')],_0x4dfdb0[_0x43e7('0x3a')]));if(_0x4b6b7f['query'][_0x43e7('0x44')]){_0x68697[_0x43e7('0x43')]=_[_0x43e7('0x45')](_0x68697['where'],{'$or':_[_0x43e7('0x32')](_0x68697[_0x43e7('0x3d')],function(_0x289f86){var _0xc9723={};_0xc9723[_0x289f86]={'$like':'%'+_0x4b6b7f[_0x43e7('0x38')][_0x43e7('0x44')]+'%'};return _0xc9723;})});}_0x68697=_[_0x43e7('0x45')]({},_0x68697,_0x4b6b7f['options']);return _0xc3976[_0x43e7('0x50')](_0x68697);}})[_0x43e7('0x1a')](function(_0x415f26){if(_0x415f26){_0xdb9fbe=_0x415f26['length'];if(!_0x4b6b7f['query'][_0x43e7('0x3e')]('nolimit')){_0x68697['limit']=qs[_0x43e7('0x2a')](_0x4b6b7f[_0x43e7('0x38')]['limit']);_0x68697[_0x43e7('0x29')]=qs[_0x43e7('0x29')](_0x4b6b7f[_0x43e7('0x38')][_0x43e7('0x29')]);}return _0xc3976[_0x43e7('0x50')](_0x68697);}})[_0x43e7('0x1a')](function(_0x398a78){if(_0x398a78){return _0x398a78?{'count':_0xdb9fbe,'rows':_0x398a78}:null;}})['then'](respondWithResult(_0x1f7c02,null))[_0x43e7('0x24')](handleError(_0x1f7c02,null));};exports[_0x43e7('0x54')]=function(_0x4e5956,_0x418213,_0x5c2c5f){var _0x26ee52={};var _0x248936={};var _0x37301b;var _0x1ca24b;return db['ZohoConfiguration'][_0x43e7('0x51')]({'where':{'id':_0x4e5956[_0x43e7('0x52')]['id']}})[_0x43e7('0x1a')](handleEntityNotFound(_0x418213,null))['then'](function(_0x17889c){if(_0x17889c){_0x37301b=_0x17889c;_0x248936[_0x43e7('0x36')]=_[_0x43e7('0x39')](db[_0x43e7('0x53')][_0x43e7('0x4a')]);_0x248936['query']=_[_0x43e7('0x39')](_0x4e5956[_0x43e7('0x38')]);_0x248936[_0x43e7('0x3a')]=_[_0x43e7('0x3b')](_0x248936[_0x43e7('0x36')],_0x248936[_0x43e7('0x38')]);_0x26ee52[_0x43e7('0x3d')]=_['intersection'](_0x248936['model'],qs[_0x43e7('0x3c')](_0x4e5956['query']['fields']));_0x26ee52['attributes']=_0x26ee52[_0x43e7('0x3d')][_0x43e7('0x4b')]?_0x26ee52[_0x43e7('0x3d')]:_0x248936[_0x43e7('0x36')];_0x26ee52[_0x43e7('0x40')]=qs[_0x43e7('0x41')](_0x4e5956['query'][_0x43e7('0x41')]);_0x26ee52[_0x43e7('0x43')]=qs[_0x43e7('0x3a')](_['pick'](_0x4e5956[_0x43e7('0x38')],_0x248936[_0x43e7('0x3a')]));if(_0x4e5956[_0x43e7('0x38')][_0x43e7('0x44')]){_0x26ee52[_0x43e7('0x43')]=_[_0x43e7('0x45')](_0x26ee52[_0x43e7('0x43')],{'$or':_[_0x43e7('0x32')](_0x26ee52['attributes'],function(_0x52c757){var _0x55990c={};_0x55990c[_0x52c757]={'$like':'%'+_0x4e5956[_0x43e7('0x38')][_0x43e7('0x44')]+'%'};return _0x55990c;})});}_0x26ee52=_['merge']({},_0x26ee52,_0x4e5956[_0x43e7('0x46')]);return _0x37301b[_0x43e7('0x54')](_0x26ee52);}})[_0x43e7('0x1a')](function(_0x8e60f1){if(_0x8e60f1){_0x1ca24b=_0x8e60f1['length'];if(!_0x4e5956['query']['hasOwnProperty'](_0x43e7('0x3f'))){_0x26ee52[_0x43e7('0x2a')]=qs['limit'](_0x4e5956['query'][_0x43e7('0x2a')]);_0x26ee52[_0x43e7('0x29')]=qs[_0x43e7('0x29')](_0x4e5956['query'][_0x43e7('0x29')]);}return _0x37301b[_0x43e7('0x54')](_0x26ee52);}})[_0x43e7('0x1a')](function(_0xb04082){if(_0xb04082){return _0xb04082?{'count':_0x1ca24b,'rows':_0xb04082}:null;}})['then'](respondWithResult(_0x418213,null))[_0x43e7('0x24')](handleError(_0x418213,null));};exports['getDescriptions']=function(_0xa66309,_0x3ab790,_0x24a168){var _0x90667c={};var _0xa7cb2c={};var _0x45adef;var _0x126133;return db['ZohoConfiguration'][_0x43e7('0x51')]({'where':{'id':_0xa66309[_0x43e7('0x52')]['id']}})[_0x43e7('0x1a')](handleEntityNotFound(_0x3ab790,null))[_0x43e7('0x1a')](function(_0x550960){if(_0x550960){_0x45adef=_0x550960;_0xa7cb2c['model']=_['keys'](db[_0x43e7('0x53')]['rawAttributes']);_0xa7cb2c[_0x43e7('0x38')]=_[_0x43e7('0x39')](_0xa66309[_0x43e7('0x38')]);_0xa7cb2c[_0x43e7('0x3a')]=_[_0x43e7('0x3b')](_0xa7cb2c[_0x43e7('0x36')],_0xa7cb2c[_0x43e7('0x38')]);_0x90667c[_0x43e7('0x3d')]=_[_0x43e7('0x3b')](_0xa7cb2c[_0x43e7('0x36')],qs[_0x43e7('0x3c')](_0xa66309['query'][_0x43e7('0x3c')]));_0x90667c[_0x43e7('0x3d')]=_0x90667c[_0x43e7('0x3d')][_0x43e7('0x4b')]?_0x90667c[_0x43e7('0x3d')]:_0xa7cb2c['model'];_0x90667c['order']=qs[_0x43e7('0x41')](_0xa66309[_0x43e7('0x38')]['sort']);_0x90667c[_0x43e7('0x43')]=qs[_0x43e7('0x3a')](_['pick'](_0xa66309['query'],_0xa7cb2c[_0x43e7('0x3a')]));if(_0xa66309[_0x43e7('0x38')][_0x43e7('0x44')]){_0x90667c[_0x43e7('0x43')]=_[_0x43e7('0x45')](_0x90667c['where'],{'$or':_['map'](_0x90667c[_0x43e7('0x3d')],function(_0x18c438){var _0x3ce34b={};_0x3ce34b[_0x18c438]={'$like':'%'+_0xa66309[_0x43e7('0x38')]['filter']+'%'};return _0x3ce34b;})});}_0x90667c=_[_0x43e7('0x45')]({},_0x90667c,_0xa66309[_0x43e7('0x46')]);return _0x45adef[_0x43e7('0x55')](_0x90667c);}})[_0x43e7('0x1a')](function(_0x5bc060){if(_0x5bc060){_0x126133=_0x5bc060[_0x43e7('0x4b')];if(!_0xa66309[_0x43e7('0x38')][_0x43e7('0x3e')](_0x43e7('0x3f'))){_0x90667c[_0x43e7('0x2a')]=qs['limit'](_0xa66309[_0x43e7('0x38')][_0x43e7('0x2a')]);_0x90667c['offset']=qs[_0x43e7('0x29')](_0xa66309[_0x43e7('0x38')][_0x43e7('0x29')]);}return _0x45adef[_0x43e7('0x55')](_0x90667c);}})['then'](function(_0x3da183){if(_0x3da183){return _0x3da183?{'count':_0x126133,'rows':_0x3da183}:null;}})['then'](respondWithResult(_0x3ab790,null))[_0x43e7('0x24')](handleError(_0x3ab790,null));};