Built motion from commit 43538d75.|2.5.35
[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 _0x3557=['SalesforceConfiguration','Configurations','moduleSearch','moduleCreate','ticketType','leadId','additionalSearchAccount','additionalSearchLead','SalesforceField','Variable','Descriptions','Request','GetSalesforceAccount','name','username','password','remoteUri','clientId','clientSecret','serverUrl'];(function(_0x4eb954,_0x533f54){var _0x34ec5a=function(_0x5b1712){while(--_0x5b1712){_0x4eb954['push'](_0x4eb954['shift']());}};_0x34ec5a(++_0x533f54);}(_0x3557,0x137));var _0x7355=function(_0x470f63,_0x48d80b){_0x470f63=_0x470f63-0x0;var _0x4f09e2=_0x3557[_0x470f63];return _0x4f09e2;};'use strict';var client=require('../../client');exports['getSalesforceAccounts']=function(){return function(_0x3801e6){return client[_0x7355('0x0')](_0x7355('0x1'),{'options':{'raw':![],'attributes':['id',_0x7355('0x2'),_0x7355('0x3'),_0x7355('0x4'),_0x7355('0x5'),_0x7355('0x6'),_0x7355('0x7'),'securityToken',_0x7355('0x8'),'type'],'include':[{'model':_0x7355('0x9'),'as':_0x7355('0xa'),'attributes':['id',_0x7355('0x2'),_0x7355('0xb'),_0x7355('0xc'),_0x7355('0xd'),_0x7355('0xe'),_0x7355('0xf'),'additionalSearchContact',_0x7355('0x10')],'include':[{'model':_0x7355('0x11'),'as':'Subjects','include':[{'model':_0x7355('0x12'),'as':_0x7355('0x12'),'attributes':['id','name']}]},{'model':_0x7355('0x11'),'as':_0x7355('0x13'),'include':[{'model':_0x7355('0x12'),'as':_0x7355('0x12'),'attributes':['id',_0x7355('0x2')]}]},{'model':'SalesforceField','as':'Fields','include':[{'model':_0x7355('0x12'),'as':_0x7355('0x12'),'attributes':['id',_0x7355('0x2')]}]}]}]},'log':_0x7355('0x1')});};};