72b1677382cd18ff1e5939090b333a864f8f1a5e
[motion2.git] / server / services / ami / rpc / integrations / salesforce.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 _0x1364=['moduleSearch','moduleCreate','ticketType','additionalSearchAccount','additionalSearchContact','SalesforceField','Subjects','Variable','Descriptions','Fields','GetSalesforceAccount','../../client','Request','name','password','remoteUri','clientId','serverUrl','SalesforceConfiguration','Configurations'];(function(_0x4fbc20,_0x33bbc4){var _0x419740=function(_0x2a692a){while(--_0x2a692a){_0x4fbc20['push'](_0x4fbc20['shift']());}};_0x419740(++_0x33bbc4);}(_0x1364,0x1eb));var _0x4136=function(_0x4470d2,_0x667f5f){_0x4470d2=_0x4470d2-0x0;var _0x72f2dc=_0x1364[_0x4470d2];return _0x72f2dc;};'use strict';var client=require(_0x4136('0x0'));exports['getSalesforceAccounts']=function(){return function(_0xd4061e){return client[_0x4136('0x1')]('GetSalesforceAccount',{'options':{'raw':![],'attributes':['id',_0x4136('0x2'),'username',_0x4136('0x3'),_0x4136('0x4'),_0x4136('0x5'),'clientSecret','securityToken',_0x4136('0x6'),'type'],'include':[{'model':_0x4136('0x7'),'as':_0x4136('0x8'),'attributes':['id',_0x4136('0x2'),_0x4136('0x9'),_0x4136('0xa'),_0x4136('0xb'),'leadId',_0x4136('0xc'),_0x4136('0xd'),'additionalSearchLead'],'include':[{'model':_0x4136('0xe'),'as':_0x4136('0xf'),'include':[{'model':_0x4136('0x10'),'as':_0x4136('0x10'),'attributes':['id',_0x4136('0x2')]}]},{'model':'SalesforceField','as':_0x4136('0x11'),'include':[{'model':_0x4136('0x10'),'as':'Variable','attributes':['id','name']}]},{'model':_0x4136('0xe'),'as':_0x4136('0x12'),'include':[{'model':_0x4136('0x10'),'as':'Variable','attributes':['id',_0x4136('0x2')]}]}]}]},'log':_0x4136('0x13')});};};