344152e799ff07634f15d0dc2f2b417db0f2575f
[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 _0xf0c9=['data4','data5','data6','data7','../client','getTriggers','Request','GetTrigger','name','Condition','AllConditions','field','operator','value','Action','Actions','data1','data2','data3'];(function(_0x59a71f,_0x2040ab){var _0x2af71d=function(_0x2d611e){while(--_0x2d611e){_0x59a71f['push'](_0x59a71f['shift']());}};_0x2af71d(++_0x2040ab);}(_0xf0c9,0x89));var _0x9f0c=function(_0x110f2a,_0x28e5a4){_0x110f2a=_0x110f2a-0x0;var _0x447730=_0xf0c9[_0x110f2a];return _0x447730;};'use strict';var client=require(_0x9f0c('0x0'));exports[_0x9f0c('0x1')]=function(_0x212daf){return function(_0x5a6412){return client[_0x9f0c('0x2')](_0x9f0c('0x3'),{'options':{'raw':![],'attributes':['id',_0x9f0c('0x4'),'channel','status'],'include':[{'model':_0x9f0c('0x5'),'as':_0x9f0c('0x6'),'attributes':['id',_0x9f0c('0x7'),_0x9f0c('0x8'),_0x9f0c('0x9')]},{'model':_0x9f0c('0x5'),'as':'AnyConditions','attributes':['id',_0x9f0c('0x7'),'operator',_0x9f0c('0x9')]},{'model':_0x9f0c('0xa'),'as':_0x9f0c('0xb'),'attributes':['id','action',_0x9f0c('0xc'),_0x9f0c('0xd'),_0x9f0c('0xe'),_0x9f0c('0xf'),_0x9f0c('0x10'),_0x9f0c('0x11'),_0x9f0c('0x12')]}]},'log':_0x9f0c('0x3')});};};