ea6dd04f38a4da87bc10383a6be2330cfc413086
[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 _0xe4f0=['moduleCreate','ticketType','SalesforceField','Subjects','Variable','Descriptions','Fields','../../client','getSalesforceAccounts','Request','GetSalesforceAccount','name','username','remoteUri','clientId','securityToken','serverUrl','type','Configurations'];(function(_0x9c56ca,_0x3e132d){var _0x5afe05=function(_0x124ad4){while(--_0x124ad4){_0x9c56ca['push'](_0x9c56ca['shift']());}};_0x5afe05(++_0x3e132d);}(_0xe4f0,0x111));var _0x0e4f=function(_0x2a932b,_0x5a5f03){_0x2a932b=_0x2a932b-0x0;var _0x455737=_0xe4f0[_0x2a932b];return _0x455737;};'use strict';var client=require(_0x0e4f('0x0'));exports[_0x0e4f('0x1')]=function(){return function(_0x294e01){return client[_0x0e4f('0x2')](_0x0e4f('0x3'),{'options':{'raw':![],'attributes':['id',_0x0e4f('0x4'),_0x0e4f('0x5'),'password',_0x0e4f('0x6'),_0x0e4f('0x7'),'clientSecret',_0x0e4f('0x8'),_0x0e4f('0x9'),_0x0e4f('0xa')],'include':[{'model':'SalesforceConfiguration','as':_0x0e4f('0xb'),'attributes':['id','name','moduleSearch',_0x0e4f('0xc'),_0x0e4f('0xd')],'include':[{'model':_0x0e4f('0xe'),'as':_0x0e4f('0xf'),'include':[{'model':_0x0e4f('0x10'),'as':'Variable','attributes':['id',_0x0e4f('0x4')]}]},{'model':_0x0e4f('0xe'),'as':_0x0e4f('0x11'),'include':[{'model':_0x0e4f('0x10'),'as':'Variable','attributes':['id',_0x0e4f('0x4')]}]},{'model':'SalesforceField','as':_0x0e4f('0x12'),'include':[{'model':_0x0e4f('0x10'),'as':_0x0e4f('0x10'),'attributes':['id',_0x0e4f('0x4')]}]}]}]},'log':_0x0e4f('0x3')});};};