Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / config / seedDB / voiceQueues.js
1 const a884_0x2e54=['addBlackLists','Support','noice','../../mysqldb','Voice\x20Queues\x20have\x20been\x20created','bulkCreate','error','rrmemory','app','CallbackCampaign','addAgents','Telemarketing','wait','outbound','Survey','inbound','Can\x27t\x20create\x20Voice\x20Queues','inbound\x20voice\x20queue\x20auto\x20generated','addLists','type','outbound\x20voice\x20queue\x20campaign\x20auto\x20generated','VoiceQueue','addTeams','findAll'];(function(_0x20015b,_0x2e542d){const _0x2a79f1=function(_0x2e1a44){while(--_0x2e1a44){_0x20015b['push'](_0x20015b['shift']());}};_0x2a79f1(++_0x2e542d);}(a884_0x2e54,0x116));const a884_0x2a79=function(_0x20015b,_0x2e542d){_0x20015b=_0x20015b-0x0;let _0x2a79f1=a884_0x2e54[_0x20015b];return _0x2a79f1;};const _0x3cd8df=a884_0x2a79;'use strict';const db=require(_0x3cd8df('0xd'))['db'],logger=require('../logger')(_0x3cd8df('0x12')),voiceQueues=[{'id':0x1,'type':'inbound','name':_0x3cd8df('0xb'),'strategy':'ringall','musiconhold':_0x3cd8df('0x16'),'description':_0x3cd8df('0x3')},{'id':0x2,'type':_0x3cd8df('0x1'),'name':'Sales','strategy':'ringall','musiconhold':_0x3cd8df('0x16'),'description':_0x3cd8df('0x3')},{'id':0x3,'type':_0x3cd8df('0x17'),'name':_0x3cd8df('0x0'),'strategy':_0x3cd8df('0x11'),'TrunkId':0x1,'IntervalId':0x1,'musiconhold':_0x3cd8df('0xc'),'description':_0x3cd8df('0x6')},{'id':0x4,'type':_0x3cd8df('0x17'),'name':_0x3cd8df('0x15'),'strategy':_0x3cd8df('0x11'),'TrunkId':0x1,'IntervalId':0x1,'musiconhold':_0x3cd8df('0xc'),'description':'outbound\x20voice\x20queue\x20campaign\x20auto\x20generated'},{'id':0x5,'type':_0x3cd8df('0x17'),'name':_0x3cd8df('0x13'),'strategy':'rrmemory','TrunkId':0x1,'IntervalId':0x1,'musiconhold':_0x3cd8df('0xc'),'description':'outbound\x20voice\x20queue\x20campaign\x20auto\x20generated'}];async function create(){const _0x107eef=_0x3cd8df;try{await db[_0x107eef('0x7')][_0x107eef('0xf')](voiceQueues,{'ignoreDuplicates':!![],'individualHooks':!![]});const _0x2e1a44=await db[_0x107eef('0x7')][_0x107eef('0x9')]();for(const _0x37c7ea of _0x2e1a44){await _0x37c7ea[_0x107eef('0x14')]([0x2,0x3],{'ignoreDuplicates':!![],'individualHooks':!![]}),await _0x37c7ea[_0x107eef('0x8')]([0x1],{'ignoreDuplicates':!![],'individualHooks':!![]}),_0x37c7ea[_0x107eef('0x5')]===_0x107eef('0x17')&&_0x37c7ea['id']!==0x5&&(await _0x37c7ea[_0x107eef('0x4')]([0x1],{'ignoreDuplicates':!![],'individualHooks':!![]}),await _0x37c7ea[_0x107eef('0xa')]([0x2],{'ignoreDuplicates':!![],'individualHooks':!![]})),_0x37c7ea['id']===0x5&&await _0x37c7ea[_0x107eef('0x4')]([0x3],{'ignoreDuplicates':!![],'individualHooks':!![]});}logger['info'](_0x107eef('0xe'));}catch(_0x29406f){logger[_0x107eef('0x10')](_0x107eef('0x2'),_0x29406f);throw _0x29406f;}}module['exports']={'create':create};