Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / services / ami / rpc / integrations / freshsales.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 _0x49c1=['GetFreshsalesccount','../../client','Request','GetFreshsalesAccount','username','apiKey','serverUrl','FreshsalesConfiguration','name','Subjects','type','variableName','Variable','FreshsalesField','content','key','keyType'];(function(_0x44f37c,_0x37909a){var _0x58213e=function(_0x45bdc8){while(--_0x45bdc8){_0x44f37c['push'](_0x44f37c['shift']());}};_0x58213e(++_0x37909a);}(_0x49c1,0xef));var _0x149c=function(_0x3d1496,_0x1a6e76){_0x3d1496=_0x3d1496-0x0;var _0x360082=_0x49c1[_0x3d1496];return _0x360082;};'use strict';var client=require(_0x149c('0x0'));exports['getFreshsalesAccounts']=function(){return function(_0x466227){return client[_0x149c('0x1')](_0x149c('0x2'),{'options':{'raw':![],'attributes':['id','name',_0x149c('0x3'),_0x149c('0x4'),'remoteUri',_0x149c('0x5')],'include':[{'model':_0x149c('0x6'),'as':'Configurations','attributes':['id',_0x149c('0x7')],'include':[{'model':'FreshsalesField','as':_0x149c('0x8'),'attributes':['id',_0x149c('0x9'),'content',_0x149c('0xa')],'include':[{'model':_0x149c('0xb'),'as':'Variable','attributes':['id',_0x149c('0x7')]}]},{'model':_0x149c('0xc'),'as':'Descriptions','attributes':['id',_0x149c('0x9'),_0x149c('0xd'),_0x149c('0xe'),_0x149c('0xf'),'keyContent',_0x149c('0xa')],'include':[{'model':_0x149c('0xb'),'as':_0x149c('0xb'),'attributes':['id',_0x149c('0x7')]}]}]}]},'log':_0x149c('0x10')});};};