Built motion from commit (unavailable).|2.3.1
[motion2.git] / server / api / intSugarcrmConfiguration / intSugarcrmConfiguration.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 _0xf743=['../../config/utils','../../config/environment','../../mysqldb','jayson/promise','http','request','then','info','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','end','json','count','offset','limit','set','Content-Range','apply','save','update','destroy','stack','name','index','SugarcrmConfiguration','rawAttributes','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','merge','map','type','key','VIRTUAL','field','filter','options','include','findAll','rows','show','params','create','body','find','getFields','findOne','order','getSubjects','SugarcrmField','getDescriptions','html-pdf','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../config/license/hardware','../../components/parsers/qs','../../config/logger'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0xf743,0x1ba));var _0x3f74=function(_0x131604,_0x475a68){_0x131604=_0x131604-0x0;var _0x4a2aea=_0xf743[_0x131604];return _0x4a2aea;};'use strict';var pdf=require(_0x3f74('0x0'));var emlformat=require(_0x3f74('0x1'));var rimraf=require('rimraf');var zipdir=require(_0x3f74('0x2'));var jsonpatch=require(_0x3f74('0x3'));var rp=require(_0x3f74('0x4'));var moment=require('moment');var BPromise=require(_0x3f74('0x5'));var Mustache=require(_0x3f74('0x6'));var util=require(_0x3f74('0x7'));var path=require(_0x3f74('0x8'));var sox=require(_0x3f74('0x9'));var csv=require(_0x3f74('0xa'));var ejs=require(_0x3f74('0xb'));var fs=require('fs');var _=require(_0x3f74('0xc'));var squel=require(_0x3f74('0xd'));var crypto=require(_0x3f74('0xe'));var jsforce=require(_0x3f74('0xf'));var deskjs=require(_0x3f74('0x10'));var toCsv=require(_0x3f74('0xa'));var querystring=require(_0x3f74('0x11'));var Papa=require(_0x3f74('0x12'));var authService=require(_0x3f74('0x13'));var hardwareService=require(_0x3f74('0x14'));var Redis=require('ioredis');var qs=require(_0x3f74('0x15'));var logger=require(_0x3f74('0x16'))('api');var utils=require(_0x3f74('0x17'));var config=require(_0x3f74('0x18'));var db=require(_0x3f74('0x19'))['db'];var jayson=require(_0x3f74('0x1a'));var client=jayson['client'][_0x3f74('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x32936b,_0x54fc95,_0x4045b6,_0xcd6af1){return new BPromise(function(_0x3f83ae,_0x221681){var _0xdf1cc3=_0xcd6af1||client;return _0xdf1cc3[_0x3f74('0x1c')](_0x32936b,_0x4045b6)[_0x3f74('0x1d')](function(_0xb5bc73){logger[_0x3f74('0x1e')](_0x3f74('0x1f'),_0x54fc95,_0x3f74('0x20'));logger['debug'](_0x3f74('0x21'),_0x54fc95,_0x3f74('0x20'),JSON[_0x3f74('0x22')](_0xb5bc73));if(_0xb5bc73[_0x3f74('0x23')]){if(_0xb5bc73[_0x3f74('0x23')][_0x3f74('0x24')]===0x1f4){logger[_0x3f74('0x23')](_0x3f74('0x1f'),_0x54fc95,_0xb5bc73['error'][_0x3f74('0x25')]);return _0x221681(_0xb5bc73[_0x3f74('0x23')][_0x3f74('0x25')]);}logger[_0x3f74('0x23')](_0x3f74('0x1f'),_0x54fc95,_0xb5bc73[_0x3f74('0x23')][_0x3f74('0x25')]);return _0x3f83ae(_0xb5bc73[_0x3f74('0x23')]['message']);}else{logger['info'](_0x3f74('0x1f'),_0x54fc95,_0x3f74('0x20'));_0x3f83ae(_0xb5bc73[_0x3f74('0x26')]['message']);}})[_0x3f74('0x27')](function(_0x57cad3){logger[_0x3f74('0x23')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x54fc95,_0x57cad3);_0x221681(_0x57cad3);});});}function respondWithStatusCode(_0x2107f6,_0xc41d3d){_0xc41d3d=_0xc41d3d||0xcc;return function(_0x240de1){if(_0x240de1){return _0x2107f6[_0x3f74('0x28')](_0xc41d3d);}return _0x2107f6[_0x3f74('0x29')](_0xc41d3d)[_0x3f74('0x2a')]();};}function respondWithResult(_0x34d5fb,_0x27eeb3){_0x27eeb3=_0x27eeb3||0xc8;return function(_0x3b9e7a){if(_0x3b9e7a){return _0x34d5fb['status'](_0x27eeb3)[_0x3f74('0x2b')](_0x3b9e7a);}};}function respondWithFilteredResult(_0x3fa647,_0x3bea86){return function(_0x108114){if(_0x108114){var _0x391f86=_0x108114[_0x3f74('0x2c')],_0x2b9301=_0x3bea86[_0x3f74('0x2d')],_0x5cb597=_0x3bea86[_0x3f74('0x2d')]+_0x3bea86[_0x3f74('0x2e')],_0x16af69;if(_0x5cb597>=_0x391f86){_0x5cb597=_0x391f86;_0x16af69=0xc8;}else{_0x16af69=0xce;}_0x3fa647[_0x3f74('0x29')](_0x16af69);return _0x3fa647[_0x3f74('0x2f')](_0x3f74('0x30'),_0x2b9301+'-'+_0x5cb597+'/'+_0x391f86)['json'](_0x108114);}return null;};}function patchUpdates(_0x569e59){return function(_0x3c03de){try{jsonpatch[_0x3f74('0x31')](_0x3c03de,_0x569e59,!![]);}catch(_0x1ef1f2){return BPromise['reject'](_0x1ef1f2);}return _0x3c03de[_0x3f74('0x32')]();};}function saveUpdates(_0x585e7c,_0x59f5bc){return function(_0x9bc87f){if(_0x9bc87f){return _0x9bc87f[_0x3f74('0x33')](_0x585e7c)[_0x3f74('0x1d')](function(_0x2c759f){return _0x2c759f;});}return null;};}function removeEntity(_0x1a281a,_0x4bdc7f){return function(_0x41c45c){if(_0x41c45c){return _0x41c45c[_0x3f74('0x34')]()[_0x3f74('0x1d')](function(){_0x1a281a[_0x3f74('0x29')](0xcc)[_0x3f74('0x2a')]();});}};}function handleEntityNotFound(_0x576a60,_0x39a1c0){return function(_0x1373ff){if(!_0x1373ff){_0x576a60[_0x3f74('0x28')](0x194);}return _0x1373ff;};}function handleError(_0x55140c,_0x5cb8f6){_0x5cb8f6=_0x5cb8f6||0x1f4;return function(_0x385221){logger[_0x3f74('0x23')](_0x385221[_0x3f74('0x35')]);if(_0x385221[_0x3f74('0x36')]){delete _0x385221[_0x3f74('0x36')];}_0x55140c[_0x3f74('0x29')](_0x5cb8f6)['send'](_0x385221);};}exports[_0x3f74('0x37')]=function(_0x1438f6,_0x46b5c5){var _0x4f160a={},_0x563b1b={},_0x57f1c2={'count':0x0,'rows':[]};var _0x1d3c93=db[_0x3f74('0x38')][_0x3f74('0x39')];_0x563b1b[_0x3f74('0x3a')]=_[_0x3f74('0x3b')](_0x1d3c93);_0x563b1b[_0x3f74('0x3c')]=_[_0x3f74('0x3b')](_0x1438f6['query']);_0x563b1b[_0x3f74('0x3d')]=_[_0x3f74('0x3e')](_0x563b1b[_0x3f74('0x3a')],_0x563b1b[_0x3f74('0x3c')]);_0x4f160a[_0x3f74('0x3f')]=_['intersection'](_0x563b1b['model'],qs[_0x3f74('0x40')](_0x1438f6[_0x3f74('0x3c')]['fields']));_0x4f160a[_0x3f74('0x3f')]=_0x4f160a[_0x3f74('0x3f')][_0x3f74('0x41')]?_0x4f160a['attributes']:_0x563b1b['model'];if(!_0x1438f6[_0x3f74('0x3c')][_0x3f74('0x42')](_0x3f74('0x43'))){_0x4f160a[_0x3f74('0x2e')]=qs[_0x3f74('0x2e')](_0x1438f6[_0x3f74('0x3c')][_0x3f74('0x2e')]);_0x4f160a[_0x3f74('0x2d')]=qs['offset'](_0x1438f6[_0x3f74('0x3c')][_0x3f74('0x2d')]);}_0x4f160a['order']=qs[_0x3f74('0x44')](_0x1438f6[_0x3f74('0x3c')][_0x3f74('0x44')]);_0x4f160a[_0x3f74('0x45')]=qs[_0x3f74('0x3d')](_[_0x3f74('0x46')](_0x1438f6[_0x3f74('0x3c')],_0x563b1b[_0x3f74('0x3d')]));if(_0x1438f6[_0x3f74('0x3c')]['filter']){_0x4f160a[_0x3f74('0x45')]=_[_0x3f74('0x47')](_0x4f160a[_0x3f74('0x45')],{'$or':_[_0x3f74('0x48')](_0x1d3c93,function(_0xb34342){if(_0xb34342[_0x3f74('0x49')][_0x3f74('0x4a')]!==_0x3f74('0x4b')){var _0x481856={};_0x481856[_0xb34342[_0x3f74('0x4c')]]={'$like':'%'+_0x1438f6[_0x3f74('0x3c')][_0x3f74('0x4d')]+'%'};return _0x481856;}})});}_0x4f160a=_['merge']({},_0x4f160a,_0x1438f6[_0x3f74('0x4e')]);var _0x5e40cf={'where':_0x4f160a[_0x3f74('0x45')]};return db[_0x3f74('0x38')][_0x3f74('0x2c')](_0x5e40cf)['then'](function(_0x5ac01c){_0x57f1c2['count']=_0x5ac01c;if(_0x1438f6[_0x3f74('0x3c')]['includeAll']){_0x4f160a[_0x3f74('0x4f')]=[{'all':!![]}];}return db[_0x3f74('0x38')][_0x3f74('0x50')](_0x4f160a);})[_0x3f74('0x1d')](function(_0x20f28c){_0x57f1c2[_0x3f74('0x51')]=_0x20f28c;return _0x57f1c2;})[_0x3f74('0x1d')](respondWithFilteredResult(_0x46b5c5,_0x4f160a))[_0x3f74('0x27')](handleError(_0x46b5c5,null));};exports[_0x3f74('0x52')]=function(_0x28fb99,_0x11f0d4){var _0x207471={'raw':![],'where':{'id':_0x28fb99[_0x3f74('0x53')]['id']}},_0x42fe49={};_0x42fe49['model']=_[_0x3f74('0x3b')](db['SugarcrmConfiguration'][_0x3f74('0x39')]);_0x42fe49[_0x3f74('0x3c')]=_['keys'](_0x28fb99[_0x3f74('0x3c')]);_0x42fe49['filters']=_[_0x3f74('0x3e')](_0x42fe49[_0x3f74('0x3a')],_0x42fe49[_0x3f74('0x3c')]);_0x207471[_0x3f74('0x3f')]=_['intersection'](_0x42fe49[_0x3f74('0x3a')],qs[_0x3f74('0x40')](_0x28fb99[_0x3f74('0x3c')][_0x3f74('0x40')]));_0x207471[_0x3f74('0x3f')]=_0x207471[_0x3f74('0x3f')][_0x3f74('0x41')]?_0x207471[_0x3f74('0x3f')]:_0x42fe49[_0x3f74('0x3a')];if(_0x28fb99[_0x3f74('0x3c')]['includeAll']){_0x207471[_0x3f74('0x4f')]=[{'all':!![]}];}_0x207471=_[_0x3f74('0x47')]({},_0x207471,_0x28fb99['options']);return db[_0x3f74('0x38')]['find'](_0x207471)[_0x3f74('0x1d')](handleEntityNotFound(_0x11f0d4,null))[_0x3f74('0x1d')](respondWithResult(_0x11f0d4,null))['catch'](handleError(_0x11f0d4,null));};exports[_0x3f74('0x54')]=function(_0x453b87,_0x11d9b9){return db['SugarcrmConfiguration'][_0x3f74('0x54')](_0x453b87[_0x3f74('0x55')],{})[_0x3f74('0x1d')](respondWithResult(_0x11d9b9,0xc9))[_0x3f74('0x27')](handleError(_0x11d9b9,null));};exports['update']=function(_0x4de2f7,_0x171440){if(_0x4de2f7[_0x3f74('0x55')]['id']){delete _0x4de2f7['body']['id'];}return db['SugarcrmConfiguration'][_0x3f74('0x56')]({'where':{'id':_0x4de2f7['params']['id']}})['then'](handleEntityNotFound(_0x171440,null))[_0x3f74('0x1d')](saveUpdates(_0x4de2f7['body'],null))[_0x3f74('0x1d')](respondWithResult(_0x171440,null))[_0x3f74('0x27')](handleError(_0x171440,null));};exports[_0x3f74('0x34')]=function(_0xe9a635,_0x367777){return db[_0x3f74('0x38')][_0x3f74('0x56')]({'where':{'id':_0xe9a635[_0x3f74('0x53')]['id']}})[_0x3f74('0x1d')](handleEntityNotFound(_0x367777,null))['then'](removeEntity(_0x367777,null))[_0x3f74('0x27')](handleError(_0x367777,null));};exports[_0x3f74('0x57')]=function(_0x4d1870,_0x186fa5,_0x3d9bdb){var _0x1a23fa={};var _0x17f2fa={};var _0x55a977;var _0x3d62cc;return db[_0x3f74('0x38')][_0x3f74('0x58')]({'where':{'id':_0x4d1870['params']['id']}})[_0x3f74('0x1d')](handleEntityNotFound(_0x186fa5,null))[_0x3f74('0x1d')](function(_0x16a1ea){if(_0x16a1ea){_0x55a977=_0x16a1ea;_0x17f2fa[_0x3f74('0x3a')]=_['keys'](db['SugarcrmField']['rawAttributes']);_0x17f2fa[_0x3f74('0x3c')]=_['keys'](_0x4d1870[_0x3f74('0x3c')]);_0x17f2fa[_0x3f74('0x3d')]=_['intersection'](_0x17f2fa[_0x3f74('0x3a')],_0x17f2fa[_0x3f74('0x3c')]);_0x1a23fa['attributes']=_[_0x3f74('0x3e')](_0x17f2fa[_0x3f74('0x3a')],qs[_0x3f74('0x40')](_0x4d1870['query']['fields']));_0x1a23fa[_0x3f74('0x3f')]=_0x1a23fa['attributes'][_0x3f74('0x41')]?_0x1a23fa[_0x3f74('0x3f')]:_0x17f2fa[_0x3f74('0x3a')];_0x1a23fa[_0x3f74('0x59')]=qs[_0x3f74('0x44')](_0x4d1870['query'][_0x3f74('0x44')]);_0x1a23fa[_0x3f74('0x45')]=qs[_0x3f74('0x3d')](_[_0x3f74('0x46')](_0x4d1870[_0x3f74('0x3c')],_0x17f2fa['filters']));if(_0x4d1870['query'][_0x3f74('0x4d')]){_0x1a23fa['where']=_[_0x3f74('0x47')](_0x1a23fa[_0x3f74('0x45')],{'$or':_[_0x3f74('0x48')](_0x1a23fa[_0x3f74('0x3f')],function(_0x2fb07a){var _0xb6d35a={};_0xb6d35a[_0x2fb07a]={'$like':'%'+_0x4d1870[_0x3f74('0x3c')][_0x3f74('0x4d')]+'%'};return _0xb6d35a;})});}_0x1a23fa=_['merge']({},_0x1a23fa,_0x4d1870[_0x3f74('0x4e')]);return _0x55a977[_0x3f74('0x57')](_0x1a23fa);}})[_0x3f74('0x1d')](function(_0x299339){if(_0x299339){_0x3d62cc=_0x299339[_0x3f74('0x41')];if(!_0x4d1870['query'][_0x3f74('0x42')]('nolimit')){_0x1a23fa[_0x3f74('0x2e')]=qs[_0x3f74('0x2e')](_0x4d1870[_0x3f74('0x3c')][_0x3f74('0x2e')]);_0x1a23fa[_0x3f74('0x2d')]=qs[_0x3f74('0x2d')](_0x4d1870[_0x3f74('0x3c')][_0x3f74('0x2d')]);}return _0x55a977['getFields'](_0x1a23fa);}})[_0x3f74('0x1d')](function(_0x166a4b){if(_0x166a4b){return _0x166a4b?{'count':_0x3d62cc,'rows':_0x166a4b}:null;}})[_0x3f74('0x1d')](respondWithResult(_0x186fa5,null))['catch'](handleError(_0x186fa5,null));};exports[_0x3f74('0x5a')]=function(_0x637e8b,_0x490f1d,_0x103633){var _0xcadd8c={};var _0x1e902d={};var _0x517c28;var _0x165497;return db[_0x3f74('0x38')]['findOne']({'where':{'id':_0x637e8b['params']['id']}})['then'](handleEntityNotFound(_0x490f1d,null))['then'](function(_0x4f8eaf){if(_0x4f8eaf){_0x517c28=_0x4f8eaf;_0x1e902d[_0x3f74('0x3a')]=_[_0x3f74('0x3b')](db[_0x3f74('0x5b')][_0x3f74('0x39')]);_0x1e902d[_0x3f74('0x3c')]=_[_0x3f74('0x3b')](_0x637e8b['query']);_0x1e902d['filters']=_[_0x3f74('0x3e')](_0x1e902d[_0x3f74('0x3a')],_0x1e902d[_0x3f74('0x3c')]);_0xcadd8c[_0x3f74('0x3f')]=_[_0x3f74('0x3e')](_0x1e902d[_0x3f74('0x3a')],qs['fields'](_0x637e8b[_0x3f74('0x3c')][_0x3f74('0x40')]));_0xcadd8c[_0x3f74('0x3f')]=_0xcadd8c[_0x3f74('0x3f')]['length']?_0xcadd8c[_0x3f74('0x3f')]:_0x1e902d[_0x3f74('0x3a')];_0xcadd8c[_0x3f74('0x59')]=qs['sort'](_0x637e8b['query'][_0x3f74('0x44')]);_0xcadd8c[_0x3f74('0x45')]=qs[_0x3f74('0x3d')](_[_0x3f74('0x46')](_0x637e8b[_0x3f74('0x3c')],_0x1e902d[_0x3f74('0x3d')]));if(_0x637e8b[_0x3f74('0x3c')]['filter']){_0xcadd8c[_0x3f74('0x45')]=_[_0x3f74('0x47')](_0xcadd8c['where'],{'$or':_[_0x3f74('0x48')](_0xcadd8c[_0x3f74('0x3f')],function(_0xcd5035){var _0x46fa41={};_0x46fa41[_0xcd5035]={'$like':'%'+_0x637e8b[_0x3f74('0x3c')][_0x3f74('0x4d')]+'%'};return _0x46fa41;})});}_0xcadd8c=_['merge']({},_0xcadd8c,_0x637e8b[_0x3f74('0x4e')]);return _0x517c28[_0x3f74('0x5a')](_0xcadd8c);}})[_0x3f74('0x1d')](function(_0x2da1b0){if(_0x2da1b0){_0x165497=_0x2da1b0[_0x3f74('0x41')];if(!_0x637e8b[_0x3f74('0x3c')]['hasOwnProperty'](_0x3f74('0x43'))){_0xcadd8c[_0x3f74('0x2e')]=qs['limit'](_0x637e8b[_0x3f74('0x3c')][_0x3f74('0x2e')]);_0xcadd8c[_0x3f74('0x2d')]=qs[_0x3f74('0x2d')](_0x637e8b['query'][_0x3f74('0x2d')]);}return _0x517c28[_0x3f74('0x5a')](_0xcadd8c);}})[_0x3f74('0x1d')](function(_0x395507){if(_0x395507){return _0x395507?{'count':_0x165497,'rows':_0x395507}:null;}})[_0x3f74('0x1d')](respondWithResult(_0x490f1d,null))[_0x3f74('0x27')](handleError(_0x490f1d,null));};exports[_0x3f74('0x5c')]=function(_0x3c4135,_0xf90646,_0x1ff437){var _0xdd156a={};var _0x5d815c={};var _0x4b5fc7;var _0x2c20a5;return db[_0x3f74('0x38')][_0x3f74('0x58')]({'where':{'id':_0x3c4135[_0x3f74('0x53')]['id']}})[_0x3f74('0x1d')](handleEntityNotFound(_0xf90646,null))[_0x3f74('0x1d')](function(_0x25f241){if(_0x25f241){_0x4b5fc7=_0x25f241;_0x5d815c['model']=_['keys'](db[_0x3f74('0x5b')]['rawAttributes']);_0x5d815c['query']=_[_0x3f74('0x3b')](_0x3c4135['query']);_0x5d815c[_0x3f74('0x3d')]=_[_0x3f74('0x3e')](_0x5d815c[_0x3f74('0x3a')],_0x5d815c[_0x3f74('0x3c')]);_0xdd156a[_0x3f74('0x3f')]=_[_0x3f74('0x3e')](_0x5d815c[_0x3f74('0x3a')],qs['fields'](_0x3c4135[_0x3f74('0x3c')][_0x3f74('0x40')]));_0xdd156a['attributes']=_0xdd156a[_0x3f74('0x3f')][_0x3f74('0x41')]?_0xdd156a[_0x3f74('0x3f')]:_0x5d815c[_0x3f74('0x3a')];_0xdd156a[_0x3f74('0x59')]=qs[_0x3f74('0x44')](_0x3c4135[_0x3f74('0x3c')][_0x3f74('0x44')]);_0xdd156a[_0x3f74('0x45')]=qs['filters'](_[_0x3f74('0x46')](_0x3c4135[_0x3f74('0x3c')],_0x5d815c[_0x3f74('0x3d')]));if(_0x3c4135['query'][_0x3f74('0x4d')]){_0xdd156a['where']=_[_0x3f74('0x47')](_0xdd156a['where'],{'$or':_[_0x3f74('0x48')](_0xdd156a['attributes'],function(_0x3370d0){var _0x25b832={};_0x25b832[_0x3370d0]={'$like':'%'+_0x3c4135[_0x3f74('0x3c')][_0x3f74('0x4d')]+'%'};return _0x25b832;})});}_0xdd156a=_[_0x3f74('0x47')]({},_0xdd156a,_0x3c4135[_0x3f74('0x4e')]);return _0x4b5fc7[_0x3f74('0x5c')](_0xdd156a);}})['then'](function(_0x31859d){if(_0x31859d){_0x2c20a5=_0x31859d[_0x3f74('0x41')];if(!_0x3c4135[_0x3f74('0x3c')][_0x3f74('0x42')](_0x3f74('0x43'))){_0xdd156a[_0x3f74('0x2e')]=qs['limit'](_0x3c4135[_0x3f74('0x3c')]['limit']);_0xdd156a[_0x3f74('0x2d')]=qs[_0x3f74('0x2d')](_0x3c4135[_0x3f74('0x3c')][_0x3f74('0x2d')]);}return _0x4b5fc7[_0x3f74('0x5c')](_0xdd156a);}})[_0x3f74('0x1d')](function(_0x32953b){if(_0x32953b){return _0x32953b?{'count':_0x2c20a5,'rows':_0x32953b}:null;}})['then'](respondWithResult(_0xf90646,null))['catch'](handleError(_0xf90646,null));};