81cffab6983e1618e0b7338f0ff733c4455eb530
[motion2.git] / server / services / ami / rpc / trigger.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 _0x5bc9=['operator','Action','Actions','action','data1','data2','data3','data4','data5','data6','data7','../client','getTriggers','GetTrigger','name','Condition','AllConditions','field','value'];(function(_0x385ca8,_0x3a1d42){var _0x202b9f=function(_0x275cb2){while(--_0x275cb2){_0x385ca8['push'](_0x385ca8['shift']());}};_0x202b9f(++_0x3a1d42);}(_0x5bc9,0x161));var _0x95bc=function(_0x3c4a10,_0x19cf73){_0x3c4a10=_0x3c4a10-0x0;var _0x14f56d=_0x5bc9[_0x3c4a10];return _0x14f56d;};'use strict';var client=require(_0x95bc('0x0'));exports[_0x95bc('0x1')]=function(_0x3255dc){return function(_0x35e5b1){return client['Request'](_0x95bc('0x2'),{'options':{'raw':![],'attributes':['id',_0x95bc('0x3'),'channel','status'],'include':[{'model':_0x95bc('0x4'),'as':_0x95bc('0x5'),'attributes':['id',_0x95bc('0x6'),'operator',_0x95bc('0x7')]},{'model':_0x95bc('0x4'),'as':'AnyConditions','attributes':['id',_0x95bc('0x6'),_0x95bc('0x8'),_0x95bc('0x7')]},{'model':_0x95bc('0x9'),'as':_0x95bc('0xa'),'attributes':['id',_0x95bc('0xb'),_0x95bc('0xc'),_0x95bc('0xd'),_0x95bc('0xe'),_0x95bc('0xf'),_0x95bc('0x10'),_0x95bc('0x11'),_0x95bc('0x12')]}]},'log':_0x95bc('0x2')});};};